diff --git a/swh/scheduler/celery_backend/recurrent_visits.py b/swh/scheduler/celery_backend/recurrent_visits.py --- a/swh/scheduler/celery_backend/recurrent_visits.py +++ b/swh/scheduler/celery_backend/recurrent_visits.py @@ -302,6 +302,12 @@ else: logger.warn("Received unexpected message %s in command queue", msg) + # Refresh the task_type object from the database for new parameters, e.g. + # the max queue length + task_type = scheduler.get_task_type(f"load-{visit_type}") + if task_type is None: + raise ValueError(f"Unknown task type: load-{visit_type}") + next_iteration = send_visits_for_visit_type( scheduler, app,