mirror of
https://github.com/kurbezz/discord-bot.git
synced 2025-12-06 15:15:37 +01:00
Fix
This commit is contained in:
@@ -47,7 +47,7 @@ async def main():
|
||||
twitch_activities.check_streams_states,
|
||||
twitch_activities.on_redemption_reward_add_activity,
|
||||
],
|
||||
workflow_runner=UnsandboxedWorkflowRunner(),
|
||||
workflow_runner=UnsandboxedWorkflowRunner()
|
||||
)
|
||||
|
||||
await worker.run()
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
from temporalio import activity
|
||||
from dataclasses import dataclass
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from applications.twitch_webhook.state import State, EventType
|
||||
from applications.twitch_webhook.watcher import StateWatcher
|
||||
|
||||
|
||||
@dataclass
|
||||
class OnStreamStateChangeActivity:
|
||||
class OnStreamStateChangeActivity(BaseModel):
|
||||
streamer_id: int
|
||||
event_type: EventType
|
||||
new_state: State | None = None
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
from temporalio.client import Client
|
||||
from temporalio.contrib.pydantic import pydantic_data_converter
|
||||
|
||||
|
||||
async def get_client() -> Client:
|
||||
return await Client.connect("temporal:7233", namespace="default")
|
||||
return await Client.connect(
|
||||
"temporal:7233",
|
||||
namespace="default",
|
||||
data_converter=pydantic_data_converter
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user