Skip to content

Commit

Permalink
fix: Update task type to use str instead of enum
Browse files Browse the repository at this point in the history
  • Loading branch information
czgu committed Aug 13, 2024
1 parent d91293a commit 485d9d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion querybook/server/tasks/all_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ def configure_workers(sender=None, conf=None, **kwargs):
@task_failure.connect
def handle_task_failure(sender, signal, *args, **kwargs):
task_type = get_schedule_task_type(sender.name)
stats_logger.incr(TASK_FAILURES, tags={"task_type": task_type})
stats_logger.incr(TASK_FAILURES, tags={"task_type": task_type.value})
2 changes: 1 addition & 1 deletion querybook/server/tasks/disable_scheduled_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def get_scheduled_datadoc_tasks(session=None):
.filter(
TaskSchedule.enabled.is_(True),
TaskSchedule.name.like(DATADOC_SCHEDULE_PREFIX + "%"),
TaskSchedule.task_type == ScheduleTaskType.USER,
TaskSchedule.task_type == ScheduleTaskType.USER.value,
)
.all()
)
Expand Down

0 comments on commit 485d9d0

Please sign in to comment.