4 Commits

Author SHA1 Message Date
0c81f079e8 Simplify Docker build workflow
Remove duplicate webhook steps and comment out unused hooks. Normalize
step syntax and adjust branch quoting for consistency.
2025-12-07 14:06:50 +01:00
75831a5406 Read Temporal URL from config
Add TEMPOLAR_URL default ("temporal:7233") to Config and use
config.TEMPOLAR_URL when connecting the Temporal client. Also import
config in temporal module and remove a duplicate httpx import.
2025-12-07 04:43:00 +01:00
eddad6454d Disable messages proc 2025-04-24 17:17:45 +02:00
8ac15a1687 Fix 2025-04-23 09:48:26 +02:00
5 changed files with 16 additions and 42 deletions

View File

@@ -3,18 +3,16 @@ name: Build docker image
on:
push:
branches:
- 'main'
- "main"
jobs:
Build-Docker-Image:
runs-on: ubuntu-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- id: repository_name
@@ -22,16 +20,14 @@ jobs:
with:
string: ${{ github.repository }}
-
name: Login to ghcr.io
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6
env:
@@ -43,32 +39,7 @@ jobs:
context: .
file: ./docker/build.dockerfile
-
name: Invoke deployment hook (game_list)
- name: Invoke deployment hook
uses: joelwmale/webhook-action@master
with:
url: ${{ secrets.WEBHOOK_URL }}
-
name: Invoke deployment hook (twitch_webhook)
uses: joelwmale/webhook-action@master
with:
url: ${{ secrets.WEBHOOK_URL_2 }}
-
name: Invoke deployment hook (temporal_worker)
uses: joelwmale/webhook-action@master
with:
url: ${{ secrets.WEBHOOK_URL_3 }}
# -
# name: Invoke deployment hook (stream_notifications)
# uses: joelwmale/webhook-action@master
# with:
# url: ${{ secrets.WEBHOOK_URL_4 }}
# -
# name: Invoke deployment hook (web_app)
# uses: joelwmale/webhook-action@master
# with:
# url: ${{ secrets.WEBHOOK_URL_5 }}

View File

@@ -308,6 +308,8 @@ class MessagesProc:
@classmethod
async def on_message(cls, received_as: str, event: MessageEvent):
return
if event.chatter_user_name in cls.FULL_IGNORED_USER_LOGINS:
return

View File

@@ -15,5 +15,5 @@ class OnMessageWorkflow:
on_message_activity,
message,
task_queue=MAIN_QUEUE,
schedule_to_close_timeout=timedelta(minutes=1)
schedule_to_close_timeout=timedelta(minutes=5)
)

View File

@@ -1,8 +1,7 @@
from httpx import Client
from pydantic import BaseModel
from pydantic_settings import BaseSettings
from httpx import Client
class Settings(BaseSettings):
VAULT_HOST: str
@@ -35,6 +34,8 @@ class Config(BaseModel):
OPENAI_API_KEY: str
TEMPOLAR_URL: str = "temporal:7233"
def get_config() -> Config:
settings = Settings() # type: ignore
@@ -45,7 +46,7 @@ def get_config() -> Config:
headers={
"X-Vault-Token": settings.VAULT_TOKEN,
"Content-Type": "application/json",
}
},
)
response.raise_for_status()

View File

@@ -1,10 +1,10 @@
from temporalio.client import Client
from temporalio.contrib.pydantic import pydantic_data_converter
from core.config import config
async def get_client() -> Client:
return await Client.connect(
"temporal:7233",
namespace="default",
data_converter=pydantic_data_converter
config.TEMPOLAR_URL, namespace="default", data_converter=pydantic_data_converter
)