diff --git a/frappe/commands/scheduler.py b/frappe/commands/scheduler.py index bbc7008321..0c8278dcbf 100755 --- a/frappe/commands/scheduler.py +++ b/frappe/commands/scheduler.py @@ -190,7 +190,7 @@ def start_scheduler(): @click.option( "--strategy", required=False, - type=click.Choice(["round_robbin", "random"]), + type=click.Choice(["round_robin", "random"]), help="Dequeuing strategy to use", ) def start_worker( diff --git a/frappe/utils/background_jobs.py b/frappe/utils/background_jobs.py index 8bfe244c93..ea7eefc44f 100755 --- a/frappe/utils/background_jobs.py +++ b/frappe/utils/background_jobs.py @@ -218,10 +218,10 @@ def start_worker( rq_username: str | None = None, rq_password: str | None = None, burst: bool = False, - strategy: Literal["round_robbin", "random"] | None = None, + strategy: Literal["round_robin", "random"] | None = None, ) -> NoReturn | None: """Wrapper to start rq worker. Connects to redis and monitors these queues.""" - DEQUEUE_STRATEGIES = {"round_robbin": RoundRobinWorker, "random": RandomWorker} + DEQUEUE_STRATEGIES = {"round_robin": RoundRobinWorker, "random": RandomWorker} with frappe.init_site(): # empty init is required to get redis_queue from common_site_config.json