mirror of
https://github.com/kurbezz/discord-bot.git
synced 2025-12-06 07:05:36 +01:00
Compare commits
8 Commits
28c64341e1
...
1c5b7e81e8
| Author | SHA1 | Date | |
|---|---|---|---|
| 1c5b7e81e8 | |||
| 586359f8ce | |||
| 12dd0f9af7 | |||
| 4174d67084 | |||
| 2d8b767ae3 | |||
| a0a53800ab | |||
| 959ab30265 | |||
| 560a5ac793 |
@@ -1,4 +1,4 @@
|
||||
FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim
|
||||
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
|
||||
|
||||
WORKDIR /app
|
||||
COPY ./pyproject.toml ./uv.lock ./
|
||||
|
||||
@@ -11,4 +11,8 @@ async def syncronize(twitch_id: int):
|
||||
if streamer.integrations.discord is None:
|
||||
return
|
||||
|
||||
await syncronize_internal(streamer.twitch, streamer.integrations.discord.guild_id)
|
||||
try:
|
||||
await syncronize_internal(streamer.twitch, streamer.integrations.discord.guild_id)
|
||||
except Exception as e:
|
||||
activity.logger.error(f"Error during synchronization: {e}")
|
||||
raise e
|
||||
|
||||
@@ -36,5 +36,6 @@ class ScheduleSyncWorkflow:
|
||||
await workflow.start_activity(
|
||||
syncronize,
|
||||
streamer.twitch.id,
|
||||
task_queue=MAIN_QUEUE,
|
||||
schedule_to_close_timeout=timedelta(minutes=5),
|
||||
)
|
||||
|
||||
@@ -28,5 +28,6 @@ class StreamsCheckWorkflow:
|
||||
async def run(self):
|
||||
await workflow.start_activity(
|
||||
check_streams_states,
|
||||
task_queue=MAIN_QUEUE,
|
||||
schedule_to_close_timeout=timedelta(minutes=1)
|
||||
)
|
||||
|
||||
@@ -7,6 +7,7 @@ from twitchAPI.helper import first
|
||||
from applications.twitch_webhook.state import UpdateEvent, EventType, State
|
||||
from applications.twitch_webhook.twitch.authorize import authorize
|
||||
from applications.twitch_webhook.activities.on_state_change import on_stream_state_change_activity, OnStreamStateChangeActivity
|
||||
from applications.temporal_worker.queues import MAIN_QUEUE
|
||||
|
||||
|
||||
@workflow.defn
|
||||
@@ -34,5 +35,6 @@ class OnChannelUpdateWorkflow:
|
||||
last_live_at=datetime.now(timezone.utc)
|
||||
),
|
||||
),
|
||||
task_queue=MAIN_QUEUE,
|
||||
schedule_to_close_timeout=timedelta(minutes=1)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user