From 9aab62d5e4911a01e20dbc79ac184f3b18b26854 Mon Sep 17 00:00:00 2001 From: Ali <010109ali@gmail.com> Date: Mon, 15 Jun 2026 16:36:04 +0000 Subject: [PATCH] docs(amas): clarify why import stays on the default queue The "short" queue caused the import to run concurrently with the post-setup desk load and deadlock on the tabSessions row. Document that default is intentional; the queue arg stays for callers that need it. Co-Authored-By: Claude Opus 4.8 (1M context) --- invoice_az/amas_api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/invoice_az/amas_api.py b/invoice_az/amas_api.py index 5fe37e3..eeb9a2f 100644 --- a/invoice_az/amas_api.py +++ b/invoice_az/amas_api.py @@ -2736,10 +2736,10 @@ def import_bulk_employees(asan_login_name, employees_data, company, create_desig Refuses to enqueue if an import for the same Asan Login is already running. - ``queue`` lets callers pick a less-contended RQ queue. The setup wizard passes - "short" so the import isn't stuck behind the pile of post-setup jobs on the - default queue (a single `bench worker` drains queues short→default→long, so - "short" jumps the line and starts as soon as the worker frees). + ``queue`` lets callers pick the RQ queue. Default "default" is deliberate: + routing to the higher-priority "short" queue makes the import run immediately + and concurrently with the post-setup desk load, and the two deadlock on the + tabSessions row (CSRF token write). Prefer a slightly later start over that. """ if isinstance(employees_data, str): employees_data = json.loads(employees_data)