SIENTIAPDE-1350: Integrate cleanup workflow and update default task queue names.
This commit is contained in:
@@ -15,7 +15,7 @@ from temporalio.client import (
|
||||
SCHEDULE_ID = os.getenv('CLEANUP_SCHEDULE_ID', 'cleanup-files-daily')
|
||||
CLEANUP_CRON = os.getenv('CLEANUP_CRON', '0 0 * * *') # Default: midnight UTC
|
||||
CLEANUP_TIMEZONE = os.getenv('CLEANUP_TIMEZONE', 'UTC')
|
||||
CLEANUP_TASK_QUEUE = os.getenv('CLEANUP_TASK_QUEUE', 'cleanup_queue')
|
||||
CLEANUP_TASK_QUEUE = os.getenv('CLEANUP_TASK_QUEUE', 'cleanup-queue')
|
||||
CLEANUP_EXECUTION_TIMEOUT_HOURS = int(os.getenv('CLEANUP_EXECUTION_TIMEOUT_HOURS', '1'))
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@ async def schedule_exists(
|
||||
Args:
|
||||
client: Temporal client instance
|
||||
schedule_id: ID of the schedule to check
|
||||
logger: Logger instance for error logging
|
||||
metadata: Metadata dictionary for logging context
|
||||
|
||||
Returns:
|
||||
True if schedule exists, False otherwise
|
||||
@@ -53,6 +55,8 @@ async def create_cleanup_schedule(
|
||||
|
||||
Args:
|
||||
client: Temporal client instance
|
||||
logger: Logger instance for logging schedule operations
|
||||
metadata: Metadata dictionary for logging context
|
||||
"""
|
||||
# Check if schedule already exists
|
||||
if await schedule_exists(client, SCHEDULE_ID, logger, metadata):
|
||||
|
||||
Reference in New Issue
Block a user