feat: Update CORS origins to allow Chrome extensions and improve logging in migration tool
This commit is contained in:
@@ -348,8 +348,12 @@ class SchedulerService:
|
||||
# Check if task is still active and pending
|
||||
if not task.is_active or task.status != TaskStatus.PENDING:
|
||||
logger.warning(
|
||||
"Task %s execution skipped - is_active: %s, status: %s (should be %s)",
|
||||
task_id, task.is_active, task.status, TaskStatus.PENDING,
|
||||
"Task %s execution skipped - is_active: %s, status: %s "
|
||||
"(should be %s)",
|
||||
task_id,
|
||||
task.is_active,
|
||||
task.status,
|
||||
TaskStatus.PENDING,
|
||||
)
|
||||
return
|
||||
|
||||
@@ -364,7 +368,9 @@ class SchedulerService:
|
||||
|
||||
# Mark task as running
|
||||
logger.info(
|
||||
"Task %s starting execution (type: %s)", task_id, task.recurrence_type,
|
||||
"Task %s starting execution (type: %s)",
|
||||
task_id,
|
||||
task.recurrence_type,
|
||||
)
|
||||
await repo.mark_as_running(task)
|
||||
|
||||
@@ -383,7 +389,8 @@ class SchedulerService:
|
||||
# For CRON tasks, update execution metadata but keep PENDING
|
||||
# APScheduler handles the recurring schedule automatically
|
||||
logger.info(
|
||||
"Task %s (CRON) executed successfully, updating metadata", task_id,
|
||||
"Task %s (CRON) executed successfully, updating metadata",
|
||||
task_id,
|
||||
)
|
||||
task.last_executed_at = datetime.now(tz=UTC)
|
||||
task.executions_count += 1
|
||||
@@ -392,8 +399,11 @@ class SchedulerService:
|
||||
session.add(task)
|
||||
await session.commit()
|
||||
logger.info(
|
||||
"Task %s (CRON) metadata updated, status: %s, executions: %s",
|
||||
task_id, task.status, task.executions_count,
|
||||
"Task %s (CRON) metadata updated, status: %s, "
|
||||
"executions: %s",
|
||||
task_id,
|
||||
task.status,
|
||||
task.executions_count,
|
||||
)
|
||||
else:
|
||||
# For non-CRON recurring tasks, calculate next execution
|
||||
|
||||
Reference in New Issue
Block a user