{
  "id": "task_libraries:task-queue/python",
  "path": "/exapedia/python-task-queue-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "Python task queue libraries",
  "answer": [
    {
      "t": "text",
      "text": "Python task queue libraries run functions in background worker processes instead of inside the request that triggered them. A producer puts each job on a broker such as Redis, RabbitMQ, or PostgreSQL before a worker picks it up and records the result. These libraries let web apps and AI agents hand slow work to background workers."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "Python task queue libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#celery",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F135"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F136"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F142"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F139"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#huey",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F152"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F161"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F156"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#rq",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F167"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F168"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F174"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F171"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F169"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#arq",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F184"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F185"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F191"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#procrastinate",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F201"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F210"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#taskiq",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F221"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F222"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F230"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#dramatiq",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F242"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F243"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F249"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F246"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#django-rq",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F259"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F260"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F268"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F263"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F261"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "PyPI"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#celery",
          "label": [
            {
              "t": "text",
              "text": "Celery"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F136"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Redis queue transport",
            "RabbitMQ queue transport"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#celery",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F135"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#huey",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F152"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#rq",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F167"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F175"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F176"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#arq",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F184"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F192"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F193"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#procrastinate",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F201"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F211"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#taskiq",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F221"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F232"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#dramatiq",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F242"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F250"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F251"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#django-rq",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F259"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F269"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F270"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "celery",
          "name": [
            {
              "t": "fact",
              "fact": "F135"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/celery/celery"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/celery"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F11"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F136"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F142"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F138"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/celery/celery",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F135"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F12"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F150"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/readthedocs/readthedocs.org",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F150"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def finish_import_project(self, request, project):\n    \"\"\"\n    Perform last steps to import a project into Read the Docs.\n\n    - Add the user from request as maintainer\n    - Run extra tasks that are needed before building the project\n    - Trigger the initial build\n\n    Direct upload projects skip the last two steps:\n    Read the Docs never builds them, and the webhook and SSH key are not needed.\n\n    It requires the Project was already saved into the DB.\n\n    :param request: Django Request object\n    :param project: Project instance just imported (already saved)\n    \"\"\"\n    project.users.add(request.user)\n    log.info(\n        \"Project imported.\",\n        project_slug=project.slug,\n        user_username=request.user.username,\n    )\n\n    if project.is_direct_upload:\n        return None\n\n    update_docs, build = prepare_build(project)\n    if (update_docs, build) == (None, None):\n        return None\n\n    tasks = self._get_post_import_tasks(project, request.user)\n    # Build-isolated builds are dispatched by ``admit_queued_builds``,\n    # running ``update_docs`` too would build it twice on two builders.\n    if not project.has_feature(Feature.USE_BUILD_ISOLATED):\n        tasks.append(update_docs)\n    if tasks:\n        chain(*tasks).apply_async()\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/readthedocs/readthedocs.org/blob/38dd30b02babe5890d38d2bb488f08cfeb97cf3c/readthedocs/projects/views/mixins.py#L99-L135",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F149"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20applications%20using%20celery%20for%20queued%20task%20chains%2C%20worker%20metrics%2C%20retry%20middleware%20and%20job%20cancellation&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F135"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "# tasks.py\nfrom celery import Celery\n\napp = Celery(\"tasks\", broker=\"redis://localhost:6379/0\")\n\n@app.task\ndef add(x, y):\n    return x + y\n\n# producer.py\nimport tasks\n\nresult = tasks.add.delay(1, 2)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://docs.celeryq.dev/en/stable/getting-started/first-steps-with-celery.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "first-steps-with-celery.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F140"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "huey",
          "name": [
            {
              "t": "fact",
              "fact": "F152"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/coleifer/huey"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/huey"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F159"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F161"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F155"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/coleifer/huey",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F152"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "# tasks.py\nfrom huey import SqliteHuey\n\nhuey = SqliteHuey(\"demo\", filename=\"huey.db\")\n\n@huey.task()\ndef add(x, y):\n    return x + y\n\n# producer.py\nimport tasks\n\nresult = tasks.add(1, 2)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://huey.readthedocs.io/en/latest/guide.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "guide.html"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=huey%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F152"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F157"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "rq",
          "name": [
            {
              "t": "fact",
              "fact": "F167"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/rq/rq"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/rq"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F36"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F168"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F174"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F169"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/rq/rq",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F167"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F37"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F38"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F44"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F182"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F183"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/frappe/frappe",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F182"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def start_worker_pool(\n\tqueue: str | None = None,\n\tnum_workers: int = 1,\n\tquiet: bool = False,\n\tburst: bool = False,\n) -> NoReturn:\n\t\"\"\"Start worker pool with specified number of workers.\n\n\tWARNING: This feature is considered \"EXPERIMENTAL\".\n\t\"\"\"\n\t_start_sentry()\n\n\t# If gc.freeze is done then importing modules before forking allows us to share the memory\n\timport filelock  # monitor.flush() takes a filelock inside the forked work horse\n\n\timport frappe.database.query  # sqlparse and indirect imports\n\timport frappe.query_builder  # pypika\n\timport frappe.utils  # common utils\n\timport frappe.utils.safe_exec\n\timport frappe.utils.scheduler\n\timport frappe.utils.typing_validations  # any whitelisted method uses this\n\timport frappe.website.path_resolver  # all the page types and resolver\n\t# end: module pre-loading\n\n\tredis_connection = get_redis_conn()\n\n\tif queue:\n\t\tqueue = [q.strip() for q in queue.split(\",\")]\n\tqueues = get_queue_list(queue, build_queue_name=True)\n\n\tif os.environ.get(\"CI\"):\n\t\tsetup_loghandlers(\"ERROR\")\n\n\tset_niceness()\n\tlogging_level = \"INFO\"\n\tif quiet:\n\t\tlogging_level = \"WARNING\"\n\n\t# TODO: Make this true by default eventually. It's limited to RQ WorkerPool\n\tif sbool(os.environ.get(\"FRAPPE_BACKGROUND_WORKERS_NOFORK\", False)):\n\t\tworker_klass = FrappeWorkerNoFork\n\telse:\n\t\timport multiprocessing\n\n\t\tmultiprocessing.set_start_method(\"fork\", force=True)\n\t\tworker_klass = FrappeWorker\n\n\tpool = WorkerPool(\n\t\tqueues=queues,\n\t\tconnection=redis_connection,\n\t\tnum_workers=num_workers,\n\t\tworker_class=worker_klass,\n\t)\n\tpool.start(logging_level=logging_level, burst=burst)\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/frappe/frappe/blob/151dc461cc90409b0fb75b36b34a619bdaa95f45/frappe/utils/background_jobs.py#L523-L576",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F181"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20applications%20using%20rq%20for%20queued%20task%20chains%2C%20worker%20metrics%2C%20retry%20middleware%20and%20job%20cancellation&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F167"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from redis import Redis\nfrom rq import Queue\n\nqueue = Queue(connection=Redis())\njob = queue.enqueue(\"math.floor\", 2.7)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://python-rq.org/docs/",
                  "label": [
                    {
                      "t": "text",
                      "text": "run_example.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F172"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "arq",
          "name": [
            {
              "t": "fact",
              "fact": "F184"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/python-arq/arq"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/arq"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F62"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F185"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F191"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F187"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/python-arq/arq",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F184"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F63"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F64"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F67"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F68"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F69"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F70"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F199"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/zylon-ai/private-gpt",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F199"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "async def _abort_job(*, job_id: str, queue_name: str, timeout: int) -> bool:\n    redis = await _get_pool()\n    job = Job(\n        job_id,\n        redis=redis,\n        _queue_name=queue_name,\n    )\n    try:\n        return await job.abort(timeout=timeout)\n    except TimeoutError:\n        logger.warning(\n            \"Timed out confirming abort for job_id=%s queue=%s\",\n            job_id,\n            queue_name,\n        )\n        return False\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/zylon-ai/private-gpt/blob/9d37a133f1d50e9b10ed527ce198ffd7ded1af70/private_gpt/arq/enqueue.py#L117-L132",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F198"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20applications%20using%20arq%20for%20queued%20task%20chains%2C%20worker%20metrics%2C%20retry%20middleware%20and%20job%20cancellation&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F184"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import asyncio\nfrom arq import create_pool\nfrom arq.connections import RedisSettings\n\nasync def add(ctx, x, y):\n    return x + y\n\nclass WorkerSettings:\n    functions = [add]\n\nasync def main():\n    redis = await create_pool(RedisSettings())\n    try:\n        await redis.enqueue_job(\"add\", 1, 2)\n    finally:\n        await redis.aclose()\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://arq-docs.helpmanual.io/",
                  "label": [
                    {
                      "t": "text",
                      "text": "arq-docs.helpmanual.io"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F189"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "procrastinate",
          "name": [
            {
              "t": "fact",
              "fact": "F201"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/procrastinate-org/procrastinate"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/procrastinate"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F208"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F210"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F204"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/procrastinate-org/procrastinate",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F201"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F219"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/i-am-bee/agentstack",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F219"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def create_app(configuration: Configuration) -> procrastinate.App:\n    global _app_created\n\n    if _app_created:\n        raise RuntimeError(\"App can be created only once (modifies global tasks in-place)\")\n\n    conn_string = str(configuration.persistence.db_url.get_secret_value())\n    conn_string = re.sub(r\"postgresql\\+[a-zA-Z]+://\", \"postgresql://\", conn_string)\n\n    kwargs = {\"options\": f\"-c search_path={configuration.persistence.procrastinate_schema}\"}\n    if configuration.persistence.db_use_ssl:\n        kwargs[\"sslmode\"] = \"verify-full\"\n        if configuration.persistence.db_ssl_cert:\n            kwargs[\"sslrootcert\"] = str(configuration.persistence.db_ssl_cert)\n\n    def exit_app_on_db_error(*_args, **_kwargs):\n        import os\n        import signal\n\n        logger.critical(\"DB is not responding, forcing shutdown\")\n\n        os.kill(os.getpid(), signal.SIGTERM)\n\n    app = procrastinate.App(\n        connector=procrastinate.PsycopgConnector(\n            conninfo=conn_string,\n            reconnect_failed=exit_app_on_db_error,\n            max_size=10,\n            kwargs=kwargs,\n        ),\n        worker_defaults=WorkerOptions(install_signal_handlers=False),\n    )\n    app.add_tasks_from(blueprint=file_tasks, namespace=\"text_extraction\")\n    app.add_tasks_from(blueprint=context_tasks, namespace=\"context_tasks\")\n    app.add_tasks_from(blueprint=provider_build_tasks, namespace=\"provider_build_tasks\")\n    app.add_tasks_from(blueprint=provider_discovery_tasks, namespace=\"provider_discovery_tasks\")\n    app.add_tasks_from(blueprint=provider_crons, namespace=\"cron_provider\")\n    app.add_tasks_from(blueprint=model_provider_crons, namespace=\"cron_model_provider\")\n    app.add_tasks_from(blueprint=cleanup_crons, namespace=\"cron_cleanup\")\n    app.add_tasks_from(blueprint=connector_crons, namespace=\"cron_connector\")\n    _app_created = True\n    return app\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/i-am-bee/agentstack/blob/79c786049d39684841d77fef9abfd8457a58b0bf/apps/agentstack-server/src/agentstack_server/jobs/procrastinate.py#L26-L67",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F218"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=procrastinate%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F201"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import procrastinate\n\napp = procrastinate.App(connector=procrastinate.SyncPsycopgConnector(\n    conninfo=\"postgresql://localhost/procrastinate\"))\n\n@app.task\ndef add(a, b):\n    return a + b\n\nwith app.open():\n    job_id = add.defer(a=3, b=5)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://pypi.org/pypi/procrastinate/3.12.0/json#info.description",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F206"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "taskiq",
          "name": [
            {
              "t": "fact",
              "fact": "F221"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/taskiq-python/taskiq"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/taskiq"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F228"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F222"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F230"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/taskiq-python/taskiq",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F221"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F240"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F241"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/TeKrop/overfast-api",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F240"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "async def enqueue(\n        self,\n        task_name: str,\n        *,\n        job_id: str | None = None,\n    ) -> str:\n        \"\"\"Dispatch a job to the taskiq worker, skipping duplicates.\n\n        Uses ``SET NX`` to atomically claim the dedup slot before kicking the\n        task by name (``task_name`` must match a ``@broker.task(task_name=...)``\n        in ``app/worker.py``).  If the slot is already taken the call is a no-op.\n        The ``job_id`` is passed to the task as its first positional argument.\n        \"\"\"\n        effective_id = job_id or task_name\n\n        try:\n            claimed = await self._valkey.set(\n                f\"{JOB_KEY_PREFIX}{effective_id}\",\n                \"pending\",\n                nx=True,\n                ex=settings.worker_job_timeout,\n            )\n            if not claimed:\n                logger.debug(\"[ValkeyTaskQueue] Already queued: {}\", effective_id)\n                return effective_id\n\n            await AsyncKicker(task_name, broker, {}).kiq(effective_id)\n            if settings.prometheus_enabled:\n                background_refresh_triggered_total.labels(\n                    entity_type=task_name.removeprefix(\"refresh_\")\n                ).inc()\n            logger.debug(\n                \"[ValkeyTaskQueue] Enqueued {} (job_id={})\", task_name, effective_id\n            )\n        except Exception as exc:  # noqa: BLE001\n            logger.warning(\"[ValkeyTaskQueue] Failed to enqueue {}: {}\", task_name, exc)\n\n        return effective_id\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/TeKrop/overfast-api/blob/c9a632a5fe2b257a66eab7c0b3365d451e357a88/app/adapters/tasks/valkey_task_queue.py#L46-L83",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F239"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=taskiq%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F221"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import asyncio\nfrom taskiq import InMemoryBroker\n\nbroker = InMemoryBroker()\n\n@broker.task\nasync def add_one(value: int) -> int:\n    return value + 1\n\nasync def main():\n    await broker.startup()\n    try:\n        task = await add_one.kiq(1)\n        result = await task.wait_result(timeout=2)\n        print(result.return_value)\n    finally:\n        await broker.shutdown()\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://taskiq-python.github.io/guide/getting-started.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "getting-started.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F226"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "dramatiq",
          "name": [
            {
              "t": "fact",
              "fact": "F242"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/Bogdanp/dramatiq"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/dramatiq"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F88"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F243"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F249"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/Bogdanp/dramatiq",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F242"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F89"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F90"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F91"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F92"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F93"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F94"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F95"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F96"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F257"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F258"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/polarsource/polar",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F257"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def get_broker(*, database: bool = True) -> dramatiq.Broker:\n    retry = Retry(default_backoff(), retries=50)\n    redis_pool = redis.ConnectionPool.from_url(\n        settings.redis_url,\n        client_name=f\"{settings.ENV.value}.worker.dramatiq\",\n        retry=retry,\n        retry_on_error=REDIS_RETRY_ON_ERRROR,\n        socket_timeout=10,\n        socket_connect_timeout=3,\n    )\n\n    result_backend = ResultsBackend(\n        encoder=JSONEncoder(),\n        client=SyncFailoverRedis(\n            connection_pool=redis.ConnectionPool.from_url(\n                settings.redis_url,\n                retry=retry,\n                retry_on_error=REDIS_RETRY_ON_ERRROR,\n                socket_timeout=10,\n                socket_connect_timeout=3,\n            )\n        ),\n    )\n    rate_limiter_backend = RateLimiterBackend(\n        client=SyncFailoverRedis(\n            connection_pool=redis.ConnectionPool.from_url(\n                settings.redis_url,\n                retry=retry,\n                retry_on_error=REDIS_RETRY_ON_ERRROR,\n                socket_timeout=10,\n                socket_connect_timeout=3,\n            )\n        )\n    )\n\n    middleware_list = [\n        # Infrastructure & async support\n        middleware.ShutdownNotifications(),\n        MonitoredAsyncIO(),\n        # Results backend for pipeline/group support\n        Results(backend=result_backend, result_ttl=60_000),\n        # Group completion callbacks for orchestrating task sequences\n        GroupCallbacks(rate_limiter_backend),\n        # Resource lifecycle (worker boot/shutdown)\n        *([SQLAlchemyMiddleware()] if database else []),\n        RedisMiddleware(),\n        HTTPXMiddleware(),\n        HealthMiddleware(database=database),\n        scheduler_middleware,\n        # Observability (outer layer for message processing)\n        LogContextMiddleware(),\n        LogfireMiddleware(),\n        PrometheusMiddleware(),\n        # Message flow control\n        DebounceMiddleware(redis_pool),\n        # Retry & execution control (MaxRetries must precede Retries)\n        OperationalErrorMiddleware(),\n        MaxRetriesMiddleware(),\n        middleware.Retries(\n            max_retries=settings.WORKER_MAX_RETRIES,\n            min_backoff=settings.WORKER_MIN_BACKOFF_MILLISECONDS,\n        ),\n        middleware.AgeLimit(),\n        middleware.TimeLimit(time_limit=TASK_TIME_LIMIT_DEFAULT_MS),\n        middleware.CurrentMessage(),\n    ]\n\n    broker = RoutingRedisBroker(\n        connection_pool=redis_pool,\n        client=SyncFailoverRedis(connection_pool=redis_pool),\n        middleware=middleware_list,\n        dead_message_ttl=3600 * 1000,  # 1 hour in milliseconds\n    )\n\n    return broker\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/polarsource/polar/blob/b5adc13284ed5aca994a1959543b08187ce2cabc/server/polar/worker/_broker.py#L213-L287",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F256"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20applications%20using%20dramatiq%20for%20queued%20task%20chains%2C%20worker%20metrics%2C%20retry%20middleware%20and%20job%20cancellation&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F242"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "# tasks.py\nimport dramatiq\nfrom dramatiq.brokers.redis import RedisBroker\n\ndramatiq.set_broker(RedisBroker(url=\"redis://localhost:6379/0\"))\n\n@dramatiq.actor\ndef add(x, y):\n    return x + y\n\n# producer.py\nimport tasks\n\nmessage = tasks.add.send(1, 2)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://dramatiq.io/guide.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "guide.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F247"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "django-rq",
          "name": [
            {
              "t": "fact",
              "fact": "F259"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/rq/django-rq"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/django-rq"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F266"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F260"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F268"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F262"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F261"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/rq/django-rq",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F259"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F277"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F278"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/cvat-ai/cvat",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F277"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def add_to_queue(\n    webhook: Webhook,\n    payload: dict,\n    redelivery: bool = False,\n    depends_on: JobDependencyType | None = None,\n) -> None:\n    from .tasks import send_webhook\n\n    queue = django_rq.get_queue(settings.CVAT_QUEUES.WEBHOOKS.value)\n    retry_intervals = settings.SEND_WEBHOOK_TASK_RETRIES\n    queue.enqueue_call(\n        func=send_webhook,\n        args=(webhook.id, payload, redelivery),\n        retry=Retry(max=len(retry_intervals), interval=retry_intervals),\n        failure_ttl=7 * 24 * 60 * 60,\n        depends_on=depends_on,\n    )\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/cvat-ai/cvat/blob/a86931299939c71e3a543f2b1dd7fc8424ae0484/cvat/apps/webhooks/dispatch.py#L14-L30",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F276"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=django-rq%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F259"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import django_rq\n\nqueue = django_rq.get_queue(\"default\")\njob = queue.enqueue(\"math.floor\", 2.7)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/rq/django-rq",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.rst"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F264"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which Python task queue library should I use?",
      "a": [
        {
          "t": "link",
          "href": "#celery",
          "label": [
            {
              "t": "text",
              "text": "Celery"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits distributed workers with several brokers and result backends. "
        },
        {
          "t": "link",
          "href": "#rq",
          "label": [
            {
              "t": "text",
              "text": "RQ"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits Redis-backed queues of ordinary Python functions. "
        },
        {
          "t": "link",
          "href": "#dramatiq",
          "label": [
            {
              "t": "text",
              "text": "Dramatiq"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits actor-based workers with automatic retries. "
        },
        {
          "t": "link",
          "href": "#arq",
          "label": [
            {
              "t": "text",
              "text": "arq"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits asyncio jobs on Redis."
        }
      ]
    },
    {
      "q": "What is Celery?",
      "a": [
        {
          "t": "link",
          "href": "#celery",
          "label": [
            {
              "t": "text",
              "text": "Celery"
            }
          ]
        },
        {
          "t": "text",
          "text": " dispatches Python tasks to worker processes through a message broker, with configurable result backends. Late acknowledgment can let a task run more than once after a worker crash."
        }
      ]
    },
    {
      "q": "What is Dramatiq?",
      "a": [
        {
          "t": "link",
          "href": "#dramatiq",
          "label": [
            {
              "t": "text",
              "text": "Dramatiq"
            }
          ]
        },
        {
          "t": "text",
          "text": " runs actor-based background tasks through RabbitMQ or Redis. It retries failed actors automatically with exponential backoff. Actor arguments must be JSON-encodable."
        }
      ]
    },
    {
      "q": "What is Taskiq?",
      "a": [
        {
          "t": "link",
          "href": "#taskiq",
          "label": [
            {
              "t": "text",
              "text": "Taskiq"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a distributed task queue with full async support. Its broker integrations install separately."
        }
      ]
    },
    {
      "q": "Celery vs RQ: which should I use?",
      "a": [
        {
          "t": "link",
          "href": "#celery",
          "label": [
            {
              "t": "text",
              "text": "Celery"
            }
          ]
        },
        {
          "t": "text",
          "text": " supports several brokers, result backends, and task chains. "
        },
        {
          "t": "link",
          "href": "#rq",
          "label": [
            {
              "t": "text",
              "text": "RQ"
            }
          ]
        },
        {
          "t": "text",
          "text": " queues ordinary Python functions on Redis or Valkey, with workers that each handle one job at a time."
        }
      ]
    },
    {
      "q": "What is arq?",
      "a": [
        {
          "t": "link",
          "href": "#arq",
          "label": [
            {
              "t": "text",
              "text": "arq"
            }
          ]
        },
        {
          "t": "text",
          "text": " runs asyncio jobs through Redis, with deferred execution, results, and cancellation. Its development is maintenance-only."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, celery",
      "display": "Celery",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, celery",
      "display": "52.0M",
      "asOf": "2026-11-17"
    },
    "F3": {
      "label": "License, celery",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, celery",
      "display": "5.7.0, Nov 2026",
      "asOf": "2026-11-05"
    },
    "F5": {
      "label": "Package release date, celery",
      "display": "Nov 2026",
      "asOf": "2026-11-05"
    },
    "F6": {
      "label": "Repository stars, celery",
      "display": "29.2K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Automatic retries, celery",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Result retrieval, celery",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Delayed jobs, celery",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Install, celery",
      "display": "pip install celery",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "What it does, celery",
      "display": "Dispatches Python tasks to worker processes through a message broker, with configurable result backends.",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "strengths lead, celery",
      "display": "Supports several result backends",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths, celery",
      "display": "Choose a result store independently of the task broker.",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths lead, celery",
      "display": "Retries selected exception types",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths, celery",
      "display": "Configure automatic retries with exception filters and backoff.",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "limitations lead, celery",
      "display": "Results need a configured backend",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations, celery",
      "display": "Task return values are unavailable until a result backend is configured.",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations lead, celery",
      "display": "Late acknowledgments can repeat work",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations, celery",
      "display": "Make tasks duplicate-safe when workers acknowledge after execution.",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "Quickstart, celery",
      "display": "from celery import Celery\n\napp = Celery('tasks', broker='pyamqp://guest@localhost//')\n\n@app.task\ndef add(x, y):\n    return x + y\n\n",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Project function, celery",
      "display": "def finish_import_project(self, request, project):\n    \"\"\"\n    Perform last steps to import a project into Read the Docs.\n\n    - Add the user from request as maintainer\n    - Run extra tasks that are needed before building the project\n    - Trigger the initial build\n\n    Direct upload projects skip the last two steps:\n    Read the Docs never builds them, and the webhook and SSH key are not needed.\n\n    It requires the Project was already saved into the DB.\n\n    :param request: Django Request object\n    :param project: Project instance just imported (already saved)\n    \"\"\"\n    project.users.add(request.user)\n    log.info(\n        \"Project imported.\",\n        project_slug=project.slug,\n        user_username=request.user.username,\n    )\n\n    if project.is_direct_upload:\n        return None\n\n    update_docs, build = prepare_build(project)\n    if (update_docs, build) == (None, None):\n        return None\n\n    tasks = self._get_post_import_tasks(project, request.user)\n    # Build-isolated builds are dispatched by ``admit_queued_builds``,\n    # running ``update_docs`` too would build it twice on two builders.\n    if not project.has_feature(Feature.USE_BUILD_ISOLATED):\n        tasks.append(update_docs)\n    if tasks:\n        chain(*tasks).apply_async()\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function reference, celery",
      "display": "mixins.py · finish_import_project()",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project repository, celery",
      "display": "readthedocs/readthedocs.org",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project stars, readthedocs/readthedocs.org",
      "display": "8.4K",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project push date, readthedocs/readthedocs.org",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F26": {
      "label": "Library name, rq",
      "display": "RQ",
      "asOf": "2026-11-17"
    },
    "F27": {
      "label": "Monthly downloads, rq",
      "display": "13.0M",
      "asOf": "2026-11-17"
    },
    "F28": {
      "label": "License, rq",
      "display": "BSD-2-Clause",
      "asOf": "2026-11-17"
    },
    "F29": {
      "label": "Package release, rq",
      "display": "3.0.0, Oct 2026",
      "asOf": "2026-10-28"
    },
    "F30": {
      "label": "Package release date, rq",
      "display": "Oct 2026",
      "asOf": "2026-10-28"
    },
    "F31": {
      "label": "Repository stars, rq",
      "display": "10.7K",
      "asOf": "2026-11-17"
    },
    "F32": {
      "label": "Automatic retries, rq",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Result retrieval, rq",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Delayed jobs, rq",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Install, rq",
      "display": "pip install rq",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "What it does, rq",
      "display": "Queues Python function calls for background workers backed by Redis or Valkey.",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "strengths lead, rq",
      "display": "Enqueues ordinary Python functions",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "strengths, rq",
      "display": "Dispatch an existing function with its arguments through Queue.enqueue.",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths lead, rq",
      "display": "Tracks multiple execution results",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths, rq",
      "display": "Inspect execution outcomes retained for the same job.",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "limitations lead, rq",
      "display": "Each worker handles one job",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "limitations, rq",
      "display": "Start additional workers to process jobs concurrently.",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations lead, rq",
      "display": "Job protocol stays Python-only",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations, rq",
      "display": "Use another protocol for workers implemented in other languages.",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "Quickstart, rq",
      "display": "import os\nimport time\n\nfrom fib import slow_fib\nfrom redis import Redis\n\nfrom rq import Queue\nfrom rq.job import JobStatus\n\n\ndef enqueue(connection):\n    # Range of Fibonacci numbers to compute\n    fib_range = range(20, 34)\n\n    # Kick off the tasks asynchronously\n    q = Queue(connection=connection)\n    jobs = [q.enqueue(slow_fib, arg) for arg in fib_range]\n    return jobs\n\n\ndef wait_for_all(jobs):\n    start_time = time.time()\n    done = False\n    while not done:\n        os.system('clear')\n        print(f'Asynchronously: (now = {time.time() - start_time:.2f})')\n        done = True\n        for job in jobs:\n            status = job.get_status()\n            if status is JobStatus.FINISHED:\n                result = job.return_value()\n            else:\n                result = f'({status.name})'\n                done = False\n            (arg,) = job.args\n            print(f'fib({arg}) = {result}')\n        print('')\n        print('To start the actual in the background, run a worker:')\n        print('    $ rq worker')\n        time.sleep(0.2)\n\n    print('Done')\n\n\nif __name__ == '__main__':\n    # Tell RQ what Redis connection to use\n    with Redis() as redis_conn:\n        jobs = enqueue(redis_conn)\n        wait_for_all(jobs)\n",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "Project function, rq",
      "display": "def execute_job(self, job, queue):\n    statsd_client.incr(\"rq.jobs.running.{}\".format(queue.name))\n    statsd_client.incr(\"rq.jobs.started.{}\".format(queue.name))\n    try:\n        super().execute_job(job, queue)\n    finally:\n        statsd_client.decr(\"rq.jobs.running.{}\".format(queue.name))\n        try:\n            job_status = job.get_status()\n        except InvalidJobOperation:\n            # The job's hash already expired, so its outcome is unknown. rq 1.x returned\n            # None here, which counted as a failure; keep that.\n            job_status = None\n        if job_status == JobStatus.FINISHED:\n            statsd_client.incr(\"rq.jobs.finished.{}\".format(queue.name))\n        else:\n            statsd_client.incr(\"rq.jobs.failed.{}\".format(queue.name))\n",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Project function reference, rq",
      "display": "worker.py · execute_job()",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project repository, rq",
      "display": "getredash/redash",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project stars, getredash/redash",
      "display": "28.9K",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project push date, getredash/redash",
      "display": "Nov 2026",
      "asOf": "2026-11-14"
    },
    "F51": {
      "label": "Library name, arq",
      "display": "arq",
      "asOf": "2026-11-17"
    },
    "F52": {
      "label": "Monthly downloads, arq",
      "display": "5.5M",
      "asOf": "2026-11-17"
    },
    "F53": {
      "label": "License, arq",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Package release, arq",
      "display": "0.28.0, Apr 2026",
      "asOf": "2026-04-16"
    },
    "F55": {
      "label": "Package release date, arq",
      "display": "Apr 2026",
      "asOf": "2026-04-16"
    },
    "F56": {
      "label": "Repository stars, arq",
      "display": "3.0K",
      "asOf": "2026-11-17"
    },
    "F57": {
      "label": "Automatic retries, arq",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "Result retrieval, arq",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Delayed jobs, arq",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Asyncio workers, arq",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "Install, arq",
      "display": "pip install arq",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "What it does, arq",
      "display": "Runs asyncio jobs through Redis, with deferred execution, results, and cancellation controls.",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "strengths lead, arq",
      "display": "Runs asynchronous jobs natively",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "strengths, arq",
      "display": "Use asyncio functions for nonblocking enqueueing and execution.",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths lead, arq",
      "display": "Defers jobs without separate scheduling",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "strengths, arq",
      "display": "Set a delay or target time when enqueueing a job.",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "limitations lead, arq",
      "display": "Development is maintenance-only",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "limitations, arq",
      "display": "Evaluate the maintenance policy before adopting it for new infrastructure.",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "limitations lead, arq",
      "display": "Interrupted jobs can run again",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "limitations, arq",
      "display": "Make task effects duplicate-safe when workers restart.",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "Quickstart, arq",
      "display": "import asyncio\nfrom httpx import AsyncClient\nfrom arq import create_pool\nfrom arq.connections import RedisSettings\n\n# Here you can configure the Redis connection.\n# The default is to connect to localhost:6379, no password.\nREDIS_SETTINGS = RedisSettings()\n\nasync def download_content(ctx, url):\n    session: AsyncClient = ctx['session']\n    response = await session.get(url)\n    print(f'{url}: {response.text:.80}...')\n    return len(response.text)\n\nasync def startup(ctx):\n    ctx['session'] = AsyncClient()\n\nasync def shutdown(ctx):\n    await ctx['session'].aclose()\n\nasync def main():\n    redis = await create_pool(REDIS_SETTINGS)\n    for url in ('https://facebook.com', 'https://microsoft.com', 'https://github.com'):\n        await redis.enqueue_job('download_content', url)\n\n# WorkerSettings defines the settings to use when creating the work,\n# It's used by the arq CLI.\n# redis_settings might be omitted here if using the default settings\n# For a list of all available settings, see https://arq-docs.helpmanual.io/#arq.worker.Worker\nclass WorkerSettings:\n    functions = [download_content]\n    on_startup = startup\n    on_shutdown = shutdown\n    redis_settings = REDIS_SETTINGS\n\nif __name__ == '__main__':\n    asyncio.run(main())\n\n",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Project function, arq",
      "display": "async def _abort_job(*, job_id: str, queue_name: str, timeout: int) -> bool:\n    redis = await _get_pool()\n    job = Job(\n        job_id,\n        redis=redis,\n        _queue_name=queue_name,\n    )\n    try:\n        return await job.abort(timeout=timeout)\n    except TimeoutError:\n        logger.warning(\n            \"Timed out confirming abort for job_id=%s queue=%s\",\n            job_id,\n            queue_name,\n        )\n        return False\n",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Project function reference, arq",
      "display": "enqueue.py · _abort_job()",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Project repository, arq",
      "display": "zylon-ai/private-gpt",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Project stars, zylon-ai/private-gpt",
      "display": "57.6K",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Project push date, zylon-ai/private-gpt",
      "display": "Nov 2026",
      "asOf": "2026-11-17"
    },
    "F77": {
      "label": "Library name, dramatiq",
      "display": "Dramatiq",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Monthly downloads, dramatiq",
      "display": "2.4M",
      "asOf": "2026-11-17"
    },
    "F79": {
      "label": "License, dramatiq",
      "display": "LGPL-3.0-or-later",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Package release, dramatiq",
      "display": "2.2.1, Sep 2026",
      "asOf": "2026-09-02"
    },
    "F81": {
      "label": "Package release date, dramatiq",
      "display": "Sep 2026",
      "asOf": "2026-09-02"
    },
    "F82": {
      "label": "Repository stars, dramatiq",
      "display": "5.3K",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Automatic retries, dramatiq",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "Result retrieval, dramatiq",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "Delayed jobs, dramatiq",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "Asyncio workers, dramatiq",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "Install, dramatiq",
      "display": "pip install 'dramatiq[rabbitmq, watch]' requests",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "What it does, dramatiq",
      "display": "Runs actor-based Python background tasks through RabbitMQ or Redis, with composable worker middleware.",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "strengths lead, dramatiq",
      "display": "Retries failed messages automatically",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "strengths, dramatiq",
      "display": "Retry actor failures with exponential backoff.",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "strengths lead, dramatiq",
      "display": "Supports two broker families",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "strengths, dramatiq",
      "display": "Choose RabbitMQ or Redis without replacing the actor API.",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "limitations lead, dramatiq",
      "display": "Arguments must be JSON-encodable",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "limitations, dramatiq",
      "display": "Convert custom objects before sending them to actors.",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "limitations lead, dramatiq",
      "display": "Time limits are best effort",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "limitations, dramatiq",
      "display": "Blocking system calls can outlive an actor’s time limit.",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "Quickstart, dramatiq",
      "display": "import dramatiq\nimport requests\n\n@dramatiq.actor\ndef count_words(url):\n    response = requests.get(url)\n    count = len(response.text.split(\" \"))\n    print(f\"There are {count} words at {url!r}.\")\n\n",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Project function, dramatiq",
      "display": "def get_broker(*, database: bool = True) -> dramatiq.Broker:\n    retry = Retry(default_backoff(), retries=50)\n    redis_pool = redis.ConnectionPool.from_url(\n        settings.redis_url,\n        client_name=f\"{settings.ENV.value}.worker.dramatiq\",\n        retry=retry,\n        retry_on_error=REDIS_RETRY_ON_ERRROR,\n        socket_timeout=10,\n        socket_connect_timeout=3,\n    )\n\n    result_backend = ResultsBackend(\n        encoder=JSONEncoder(),\n        client=SyncFailoverRedis(\n            connection_pool=redis.ConnectionPool.from_url(\n                settings.redis_url,\n                retry=retry,\n                retry_on_error=REDIS_RETRY_ON_ERRROR,\n                socket_timeout=10,\n                socket_connect_timeout=3,\n            )\n        ),\n    )\n    rate_limiter_backend = RateLimiterBackend(\n        client=SyncFailoverRedis(\n            connection_pool=redis.ConnectionPool.from_url(\n                settings.redis_url,\n                retry=retry,\n                retry_on_error=REDIS_RETRY_ON_ERRROR,\n                socket_timeout=10,\n                socket_connect_timeout=3,\n            )\n        )\n    )\n\n    middleware_list = [\n        # Infrastructure & async support\n        middleware.ShutdownNotifications(),\n        MonitoredAsyncIO(),\n        # Results backend for pipeline/group support\n        Results(backend=result_backend, result_ttl=60_000),\n        # Group completion callbacks for orchestrating task sequences\n        GroupCallbacks(rate_limiter_backend),\n        # Resource lifecycle (worker boot/shutdown)\n        *([SQLAlchemyMiddleware()] if database else []),\n        RedisMiddleware(),\n        HTTPXMiddleware(),\n        HealthMiddleware(database=database),\n        scheduler_middleware,\n        # Observability (outer layer for message processing)\n        LogContextMiddleware(),\n        LogfireMiddleware(),\n        PrometheusMiddleware(),\n        # Message flow control\n        DebounceMiddleware(redis_pool),\n        # Retry & execution control (MaxRetries must precede Retries)\n        OperationalErrorMiddleware(),\n        MaxRetriesMiddleware(),\n        middleware.Retries(\n            max_retries=settings.WORKER_MAX_RETRIES,\n            min_backoff=settings.WORKER_MIN_BACKOFF_MILLISECONDS,\n        ),\n        middleware.AgeLimit(),\n        middleware.TimeLimit(time_limit=TASK_TIME_LIMIT_DEFAULT_MS),\n        middleware.CurrentMessage(),\n    ]\n\n    broker = RoutingRedisBroker(\n        connection_pool=redis_pool,\n        client=SyncFailoverRedis(connection_pool=redis_pool),\n        middleware=middleware_list,\n        dead_message_ttl=3600 * 1000,  # 1 hour in milliseconds\n    )\n\n    return broker\n",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Project function reference, dramatiq",
      "display": "_broker.py · get_broker()",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Project repository, dramatiq",
      "display": "polarsource/polar",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Project stars, polarsource/polar",
      "display": "10.5K",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Project push date, polarsource/polar",
      "display": "Nov 2026",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Developer need",
      "display": "Choosing a configurable result backend",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Why choose celery",
      "display": "several built-in result backends",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Developer need in introduction",
      "display": "choosing a configurable result backend",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "When to consider dramatiq",
      "display": "automatic actor retry behavior is the priority",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Developer need",
      "display": "Dispatching existing Python functions",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Why choose rq",
      "display": "ordinary function enqueueing",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Developer need in introduction",
      "display": "dispatching existing Python functions",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "When to consider arq",
      "display": "native asyncio jobs are required",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "Developer need",
      "display": "Starting with automatic message retries",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "Why choose dramatiq",
      "display": "built-in exponential retry handling",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "Developer need in introduction",
      "display": "starting with automatic message retries",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "When to consider celery",
      "display": "result-backend selection is the priority",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "Developer need",
      "display": "Running asyncio job functions",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "Why choose arq",
      "display": "native asyncio worker execution",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "Developer need in introduction",
      "display": "running asyncio job functions",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "When to consider dramatiq",
      "display": "default actor retry handling is more important",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "Page introduction",
      "display": "Python task queue libraries let backend developers dispatch work to background workers.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: Does arq cancellation work with every worker configuration?",
      "display": "Enable allow_abort_jobs on the worker for Job.abort to have an effect.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: Are Celery results stored automatically?",
      "display": "Results are disabled by default until a result backend is configured.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: Can a worker failure cause a task to run again?",
      "display": "Celery late acknowledgment can allow multiple executions after a worker crash.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: Can a worker failure cause a task to run again?",
      "display": "arq explicitly warns that jobs can be called more than once.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: Which library runs asyncio jobs natively?",
      "display": "arq supports nonblocking asyncio job enqueueing and execution.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "FAQ: Which library runs asyncio jobs natively?",
      "display": "Dramatiq ships middleware that manages an event loop for async actors.",
      "asOf": "2026-11-17"
    },
    "F126": {
      "label": "FAQ: How does RQ retry failed jobs?",
      "display": "Configure a Retry object with retry limits and optional intervals.",
      "asOf": "2026-11-17"
    },
    "F127": {
      "label": "FAQ: Does Dramatiq retry actor failures?",
      "display": "Dramatiq automatically retries actor failures with exponential backoff.",
      "asOf": "2026-11-17"
    },
    "F128": {
      "label": "FAQ: Can arbitrary Python objects be actor arguments?",
      "display": "Dramatiq requires actor arguments to be JSON-encodable.",
      "asOf": "2026-11-17"
    },
    "F129": {
      "label": "FAQ: Does a Dramatiq time limit cancel every blocking operation?",
      "display": "Time limits cannot cancel system calls or functions that do not hold the GIL.",
      "asOf": "2026-11-17"
    },
    "F130": {
      "label": "FAQ: How does RQ achieve parallel execution?",
      "display": "Each worker processes one job at a time; run more workers for concurrency.",
      "asOf": "2026-11-17"
    },
    "F131": {
      "label": "FAQ: Is arq under active feature development?",
      "display": "The project declares maintenance-only mode.",
      "asOf": "2026-11-17"
    },
    "F132": {
      "label": "FAQ: Can tasks be deferred without sleeping in the request?",
      "display": "arq accepts a deferred duration or target time when enqueueing.",
      "asOf": "2026-11-17"
    },
    "F133": {
      "label": "FAQ: Can tasks be deferred without sleeping in the request?",
      "display": "Dramatiq actors accept a delay through send_with_options.",
      "asOf": "2026-11-17"
    },
    "F134": {
      "label": "FAQ: Does Dramatiq store actor results by default?",
      "display": "Result storage needs configured result middleware and a backend; it is disabled by default.",
      "asOf": "2026-11-17"
    },
    "F135": {
      "label": "Library name, celery",
      "display": "Celery",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Monthly downloads, celery",
      "display": "54.1M",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "License, celery",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Package release, celery",
      "display": "5.7.0",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Package release date, celery",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Install, celery",
      "display": "python -m pip install \"celery[redis]==5.7.0\"",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Quickstart, celery",
      "display": "# tasks.py\nfrom celery import Celery\n\napp = Celery(\"tasks\", broker=\"redis://localhost:6379/0\")\n\n@app.task\ndef add(x, y):\n    return x + y\n\n# producer.py\nimport tasks\n\nresult = tasks.add.delay(1, 2)\n",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Repository stars, celery",
      "display": "29.2K",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "Redis queue transport, celery",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "RabbitMQ queue transport, celery",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Queue and execution role, celery",
      "display": "General distributed callable-task workers with broker transports and canvas task signatures/chains.",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "First-call runtime prerequisites, celery",
      "display": "Disclosed two-file first call from official task/decorator/delay APIs. Redis must run locally and separate Celery worker imports tasks. Producer is a separate file, avoiding module-import job submission or __main__ task-name mismatches. Separate documented commands: celery -A tasks worker --loglevel=info; python producer.py",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "Execution model, celery",
      "display": "Distributed worker queue with built-in beat periodic submission and broker/back-end ecosystem.",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Project function, celery",
      "display": "def finish_import_project(self, request, project):\n    \"\"\"\n    Perform last steps to import a project into Read the Docs.\n\n    - Add the user from request as maintainer\n    - Run extra tasks that are needed before building the project\n    - Trigger the initial build\n\n    Direct upload projects skip the last two steps:\n    Read the Docs never builds them, and the webhook and SSH key are not needed.\n\n    It requires the Project was already saved into the DB.\n\n    :param request: Django Request object\n    :param project: Project instance just imported (already saved)\n    \"\"\"\n    project.users.add(request.user)\n    log.info(\n        \"Project imported.\",\n        project_slug=project.slug,\n        user_username=request.user.username,\n    )\n\n    if project.is_direct_upload:\n        return None\n\n    update_docs, build = prepare_build(project)\n    if (update_docs, build) == (None, None):\n        return None\n\n    tasks = self._get_post_import_tasks(project, request.user)\n    # Build-isolated builds are dispatched by ``admit_queued_builds``,\n    # running ``update_docs`` too would build it twice on two builders.\n    if not project.has_feature(Feature.USE_BUILD_ISOLATED):\n        tasks.append(update_docs)\n    if tasks:\n        chain(*tasks).apply_async()\n",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Project source file, celery",
      "display": "readthedocs/projects/views/mixins.py",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Project full_name, celery",
      "display": "readthedocs/readthedocs.org",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Project stargazers_count, celery",
      "display": "8.4K",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Library name, huey",
      "display": "Huey",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Monthly downloads, huey",
      "display": "15.7M",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "License, huey",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "Package release, huey",
      "display": "3.5.4",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Package release date, huey",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Install, huey",
      "display": "python -m pip install huey==3.5.4",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Quickstart, huey",
      "display": "# tasks.py\nfrom huey import SqliteHuey\n\nhuey = SqliteHuey(\"demo\", filename=\"huey.db\")\n\n@huey.task()\ndef add(x, y):\n    return x + y\n\n# producer.py\nimport tasks\n\nresult = tasks.add(1, 2)\n",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Official description, huey",
      "display": "Runs a small task queue.",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Quickstart source file, huey",
      "display": "guide.html",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Repository stars, huey",
      "display": "6.1K",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Redis queue transport, huey",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "RabbitMQ queue transport, huey",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Queue and execution role, huey",
      "display": "Callable task queue with native Redis,SQLite,and other documented storage options plus periodic registration and Django helpers.",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "First-call runtime prerequisites, huey",
      "display": "Disclosed two-file basic task call using built-in SQLite backend, not a required Redis service or local immediate-mode trick. Consumer and producer use same cwd/database file and module tasks; task execution is in separate consumer. Separate documented commands: huey_consumer.py tasks.huey; python producer.py",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Execution model, huey",
      "display": "Compact task queue and periodic consumer, with SQLite/Redis/filesystem backends and Django integration.",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Library name, rq",
      "display": "RQ",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Monthly downloads, rq",
      "display": "13.2M",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "License, rq",
      "display": "BSD-2-Clause",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Package release, rq",
      "display": "3.0.0",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Package release date, rq",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Install, rq",
      "display": "python -m pip install rq==3.0.0",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "Quickstart, rq",
      "display": "from redis import Redis\nfrom rq import Queue\n\nqueue = Queue(connection=Redis())\njob = queue.enqueue(\"math.floor\", 2.7)\n",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Repository stars, rq",
      "display": "10.7K",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Redis queue transport, rq",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "RabbitMQ queue transport, rq",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "Queue and execution role, rq",
      "display": "Redis-backed job queues and native worker lifecycle,including worker pools.",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "First-call runtime prerequisites, rq",
      "display": "Disclosed basic client+enqueue recipe uses a documented dotted callable path to the importable standard-library math.floor, avoiding an absent helper module or __main__ function. Requires local Redis and a separate default worker; returned Job is not a completed result. Separate documented commands: rq worker",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "Execution model, rq",
      "display": "Redis-backed function jobs, workers/pools, delayed/repeated jobs and a separate CronScheduler.",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Project function, rq",
      "display": "def start_worker_pool(\n\tqueue: str | None = None,\n\tnum_workers: int = 1,\n\tquiet: bool = False,\n\tburst: bool = False,\n) -> NoReturn:\n\t\"\"\"Start worker pool with specified number of workers.\n\n\tWARNING: This feature is considered \"EXPERIMENTAL\".\n\t\"\"\"\n\t_start_sentry()\n\n\t# If gc.freeze is done then importing modules before forking allows us to share the memory\n\timport filelock  # monitor.flush() takes a filelock inside the forked work horse\n\n\timport frappe.database.query  # sqlparse and indirect imports\n\timport frappe.query_builder  # pypika\n\timport frappe.utils  # common utils\n\timport frappe.utils.safe_exec\n\timport frappe.utils.scheduler\n\timport frappe.utils.typing_validations  # any whitelisted method uses this\n\timport frappe.website.path_resolver  # all the page types and resolver\n\t# end: module pre-loading\n\n\tredis_connection = get_redis_conn()\n\n\tif queue:\n\t\tqueue = [q.strip() for q in queue.split(\",\")]\n\tqueues = get_queue_list(queue, build_queue_name=True)\n\n\tif os.environ.get(\"CI\"):\n\t\tsetup_loghandlers(\"ERROR\")\n\n\tset_niceness()\n\tlogging_level = \"INFO\"\n\tif quiet:\n\t\tlogging_level = \"WARNING\"\n\n\t# TODO: Make this true by default eventually. It's limited to RQ WorkerPool\n\tif sbool(os.environ.get(\"FRAPPE_BACKGROUND_WORKERS_NOFORK\", False)):\n\t\tworker_klass = FrappeWorkerNoFork\n\telse:\n\t\timport multiprocessing\n\n\t\tmultiprocessing.set_start_method(\"fork\", force=True)\n\t\tworker_klass = FrappeWorker\n\n\tpool = WorkerPool(\n\t\tqueues=queues,\n\t\tconnection=redis_connection,\n\t\tnum_workers=num_workers,\n\t\tworker_class=worker_klass,\n\t)\n\tpool.start(logging_level=logging_level, burst=burst)\n",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "Project source file, rq",
      "display": "frappe/utils/background_jobs.py",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Project full_name, rq",
      "display": "frappe/frappe",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Project stargazers_count, rq",
      "display": "11.1K",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Library name, arq",
      "display": "arq",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Monthly downloads, arq",
      "display": "5.7M",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "License, arq",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Package release, arq",
      "display": "0.28.0",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Package release date, arq",
      "display": "Apr 2026",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "Install, arq",
      "display": "python -m pip install arq==0.28.0 \"redis>=5.3,<6\"",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "Quickstart, arq",
      "display": "import asyncio\nfrom arq import create_pool\nfrom arq.connections import RedisSettings\n\nasync def add(ctx, x, y):\n    return x + y\n\nclass WorkerSettings:\n    functions = [add]\n\nasync def main():\n    redis = await create_pool(RedisSettings())\n    try:\n        await redis.enqueue_job(\"add\", 1, 2)\n    finally:\n        await redis.aclose()\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Repository stars, arq",
      "display": "3.0K",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Redis queue transport, arq",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "RabbitMQ queue transport, arq",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Queue and execution role, arq",
      "display": "Asyncio callable job execution and enqueue/abort lifecycle on Redis.",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "First-call runtime prerequisites, arq",
      "display": "Disclosed minimal registered async task plus producer in tasks.py. Worker imports WorkerSettings without running guarded main. Requires local Redis and separate arq worker; Redis.aclose is the documented async Redis peer close method, not an arq-native task operation. Separate documented commands: arq tasks.WorkerSettings; python tasks.py",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Execution model, arq",
      "display": "Asyncio/Redis job workers with native deferred submission, cron configuration, and cooperative abort support.",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Project function, arq",
      "display": "async def _abort_job(*, job_id: str, queue_name: str, timeout: int) -> bool:\n    redis = await _get_pool()\n    job = Job(\n        job_id,\n        redis=redis,\n        _queue_name=queue_name,\n    )\n    try:\n        return await job.abort(timeout=timeout)\n    except TimeoutError:\n        logger.warning(\n            \"Timed out confirming abort for job_id=%s queue=%s\",\n            job_id,\n            queue_name,\n        )\n        return False\n",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "Project source file, arq",
      "display": "private_gpt/arq/enqueue.py",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "Project full_name, arq",
      "display": "zylon-ai/private-gpt",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Project stargazers_count, arq",
      "display": "57.6K",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Library name, procrastinate",
      "display": "Procrastinate",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Monthly downloads, procrastinate",
      "display": "4.3M",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "License, procrastinate",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Package release, procrastinate",
      "display": "3.12.0",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Package release date, procrastinate",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Install, procrastinate",
      "display": "python -m pip install procrastinate",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "Quickstart, procrastinate",
      "display": "import procrastinate\n\napp = procrastinate.App(connector=procrastinate.SyncPsycopgConnector(\n    conninfo=\"postgresql://localhost/procrastinate\"))\n\n@app.task\ndef add(a, b):\n    return a + b\n\nwith app.open():\n    job_id = add.defer(a=3, b=5)\n",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Official description, procrastinate",
      "display": "Processes distributed tasks on PostgreSQL.",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Quickstart source file, procrastinate",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Repository stars, procrastinate",
      "display": "1.5K",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Redis queue transport, procrastinate",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "RabbitMQ queue transport, procrastinate",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Queue and execution role, procrastinate",
      "display": "PostgreSQL-backed callable jobs,locks,and worker orchestration; native sync and async application interfaces.",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "First-call runtime prerequisites, procrastinate",
      "display": "Python3.11+,PostgreSQL13+ reachable at configured connection URI,and installed Procrastinate schema. Save as an importable module,e.g tasks.py; schema setup follows official procrastinate --app=tasks.app schema --apply. Start a separate procrastinate --app=tasks.app worker to execute queued jobs. SyncPsycopgConnector is deliberately used for sync App.open/defer; current PsycopgConnector is the async pool interface.",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "External function contract, procrastinate",
      "display": "Current3.12 App accepts connector and worker_defaults. PsycopgConnector explicitly forwards other kwargs to psycopg_pool.AsyncConnectionPool,including conninfo,max_size,reconnect_failed,and connection kwargs. Actual current pool reference accepts synchronous OR async reconnect_failed callback; original sync exit callback is not falsely rejected. kwargs options/search_path and optional sslmode/sslrootcert are host PostgreSQL connection settings; configured DB/valid TLS files required. WorkerOptions is SDK-owned TypedDict configuration mapping,not counted as an engine call; install_signal_handlers=False is explicitly supported. Eight add_tasks_from(blueprint=...,namespace=str) calls register imported original task blueprints. Returns native App with the imported task registrations. No database connection,worker start,or job dispatch happens just by this factory; imported blueprints and schema/pool lifecycle must be initialized by the original host. Single-instantiation guard and native duplicate-registration behavior remain. Nested callback terminates the process on DB reconnect failure; no failure-mode execution performed.",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Psycopg connector and callbacks, procrastinate",
      "display": "SyncPsycopgConnector uses sync ConnectionPool; PsycopgConnector uses AsyncConnectionPool and forwards driver pool kwargs. Async pool reconnect_failed accepts sync OR async callbacks; a synchronous callback is not automatically obsolete.",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Project function, procrastinate",
      "display": "def create_app(configuration: Configuration) -> procrastinate.App:\n    global _app_created\n\n    if _app_created:\n        raise RuntimeError(\"App can be created only once (modifies global tasks in-place)\")\n\n    conn_string = str(configuration.persistence.db_url.get_secret_value())\n    conn_string = re.sub(r\"postgresql\\+[a-zA-Z]+://\", \"postgresql://\", conn_string)\n\n    kwargs = {\"options\": f\"-c search_path={configuration.persistence.procrastinate_schema}\"}\n    if configuration.persistence.db_use_ssl:\n        kwargs[\"sslmode\"] = \"verify-full\"\n        if configuration.persistence.db_ssl_cert:\n            kwargs[\"sslrootcert\"] = str(configuration.persistence.db_ssl_cert)\n\n    def exit_app_on_db_error(*_args, **_kwargs):\n        import os\n        import signal\n\n        logger.critical(\"DB is not responding, forcing shutdown\")\n\n        os.kill(os.getpid(), signal.SIGTERM)\n\n    app = procrastinate.App(\n        connector=procrastinate.PsycopgConnector(\n            conninfo=conn_string,\n            reconnect_failed=exit_app_on_db_error,\n            max_size=10,\n            kwargs=kwargs,\n        ),\n        worker_defaults=WorkerOptions(install_signal_handlers=False),\n    )\n    app.add_tasks_from(blueprint=file_tasks, namespace=\"text_extraction\")\n    app.add_tasks_from(blueprint=context_tasks, namespace=\"context_tasks\")\n    app.add_tasks_from(blueprint=provider_build_tasks, namespace=\"provider_build_tasks\")\n    app.add_tasks_from(blueprint=provider_discovery_tasks, namespace=\"provider_discovery_tasks\")\n    app.add_tasks_from(blueprint=provider_crons, namespace=\"cron_provider\")\n    app.add_tasks_from(blueprint=model_provider_crons, namespace=\"cron_model_provider\")\n    app.add_tasks_from(blueprint=cleanup_crons, namespace=\"cron_cleanup\")\n    app.add_tasks_from(blueprint=connector_crons, namespace=\"cron_connector\")\n    _app_created = True\n    return app\n",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Project source file, procrastinate",
      "display": "apps/agentstack-server/src/agentstack_server/jobs/procrastinate.py",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Project full_name, procrastinate",
      "display": "i-am-bee/agentstack",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Project stargazers_count, procrastinate",
      "display": "1.2K",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Library name, taskiq",
      "display": "Taskiq",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Monthly downloads, taskiq",
      "display": "2.6M",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "License, taskiq",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Package release, taskiq",
      "display": "0.13.0",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Package release date, taskiq",
      "display": "Sep 2026",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Install, taskiq",
      "display": "python -m pip install taskiq==0.13.0",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Quickstart, taskiq",
      "display": "import asyncio\nfrom taskiq import InMemoryBroker\n\nbroker = InMemoryBroker()\n\n@broker.task\nasync def add_one(value: int) -> int:\n    return value + 1\n\nasync def main():\n    await broker.startup()\n    try:\n        task = await add_one.kiq(1)\n        result = await task.wait_result(timeout=2)\n        print(result.return_value)\n    finally:\n        await broker.shutdown()\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Official description, taskiq",
      "display": "Runs distributed tasks with full async support.",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Quickstart source file, taskiq",
      "display": "getting-started.html",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Repository stars, taskiq",
      "display": "2.4K",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Redis queue transport, taskiq",
      "display": "Via plugin",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "RabbitMQ queue transport, taskiq",
      "display": "Via plugin",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Queue and execution role, taskiq",
      "display": "Async-first distributed callable tasks with core broker protocol and separately installed transport integrations.",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "First-call runtime prerequisites, taskiq",
      "display": "Disclosed minimal local first call from official InMemoryBroker startup/kiq/wait_result/shutdown example. In-memory broker explicitly is for local development, not a production distributed worker. Production requires a real broker integration and usually result backend. Separate documented commands: ",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Execution model, taskiq",
      "display": "Async task broker abstraction with a core scheduler/schedule sources; production transports are integrations.",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "External function contract, taskiq",
      "display": "Exact0.13.0 public AsyncKicker accepts task_name:str,broker:AsyncBroker,and labels:dict; empty labels are valid. kiq accepts positional task args,here effective_id:str,and forwards through the provided broker. Original imported broker is an original ValkeyListBroker subclass of native AsyncBroker with super().__init__(); complete source proves binding. Broker startup,configured Valkey host,and matching registered task_name/argument contract are host prerequisites. Valkey SET NX is a separate host dedup operation,not another Taskiq call. kiq returns AsyncTaskiqTask,but original intentionally discards it and returns its own effective_id. The broad exception handler can return effective_id even when native dispatch failed; that ID is not proof of queue acceptance/completion. Original TTL dedup behavior/metrics/logging retained. Custom broker implementation and all historical deployment dependencies are not certified by this exact native-call review.",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Broker plugin boundary, taskiq",
      "display": "Core includes native broker/task protocol; Redis and RabbitMQ need separately installed taskiq-redis and taskiq-aio-pika integrations. Existing Overfast example instead implements an original AsyncBroker subclass for Valkey.",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "Project function, taskiq",
      "display": "async def enqueue(\n        self,\n        task_name: str,\n        *,\n        job_id: str | None = None,\n    ) -> str:\n        \"\"\"Dispatch a job to the taskiq worker, skipping duplicates.\n\n        Uses ``SET NX`` to atomically claim the dedup slot before kicking the\n        task by name (``task_name`` must match a ``@broker.task(task_name=...)``\n        in ``app/worker.py``).  If the slot is already taken the call is a no-op.\n        The ``job_id`` is passed to the task as its first positional argument.\n        \"\"\"\n        effective_id = job_id or task_name\n\n        try:\n            claimed = await self._valkey.set(\n                f\"{JOB_KEY_PREFIX}{effective_id}\",\n                \"pending\",\n                nx=True,\n                ex=settings.worker_job_timeout,\n            )\n            if not claimed:\n                logger.debug(\"[ValkeyTaskQueue] Already queued: {}\", effective_id)\n                return effective_id\n\n            await AsyncKicker(task_name, broker, {}).kiq(effective_id)\n            if settings.prometheus_enabled:\n                background_refresh_triggered_total.labels(\n                    entity_type=task_name.removeprefix(\"refresh_\")\n                ).inc()\n            logger.debug(\n                \"[ValkeyTaskQueue] Enqueued {} (job_id={})\", task_name, effective_id\n            )\n        except Exception as exc:  # noqa: BLE001\n            logger.warning(\"[ValkeyTaskQueue] Failed to enqueue {}: {}\", task_name, exc)\n\n        return effective_id\n",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "Project source file, taskiq",
      "display": "app/adapters/tasks/valkey_task_queue.py",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Project full_name, taskiq",
      "display": "TeKrop/overfast-api",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Project stargazers_count, taskiq",
      "display": "199",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Library name, dramatiq",
      "display": "dramatiq",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Monthly downloads, dramatiq",
      "display": "2.5M",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "License, dramatiq",
      "display": "LGPL-3.0",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "Package release, dramatiq",
      "display": "2.2.1",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "Package release date, dramatiq",
      "display": "Sep 2026",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "Install, dramatiq",
      "display": "python -m pip install \"dramatiq[redis]==2.2.1\"",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "Quickstart, dramatiq",
      "display": "# tasks.py\nimport dramatiq\nfrom dramatiq.brokers.redis import RedisBroker\n\ndramatiq.set_broker(RedisBroker(url=\"redis://localhost:6379/0\"))\n\n@dramatiq.actor\ndef add(x, y):\n    return x + y\n\n# producer.py\nimport tasks\n\nmessage = tasks.add.send(1, 2)\n",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "Repository stars, dramatiq",
      "display": "5.3K",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "Redis queue transport, dramatiq",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F251": {
      "label": "RabbitMQ queue transport, dramatiq",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F252": {
      "label": "Queue and execution role, dramatiq",
      "display": "Actor-based background job workers with native Redis/RabbitMQ brokers and middleware.",
      "asOf": "2026-11-20"
    },
    "F253": {
      "label": "First-call runtime prerequisites, dramatiq",
      "display": "Disclosed two-file actor send first call using explicit Redis broker setup. Requires local Redis and separate worker command; no module-import enqueue or pretend synchronous result. Actor return values are discarded unless a result backend/middleware is configured. Separate documented commands: dramatiq tasks; python producer.py",
      "asOf": "2026-11-20"
    },
    "F254": {
      "label": "Execution model, dramatiq",
      "display": "Actor worker queue with delayed message delivery and middleware; recurring scheduling needs a companion.",
      "asOf": "2026-11-20"
    },
    "F255": {
      "label": "Project function, dramatiq",
      "display": "def get_broker(*, database: bool = True) -> dramatiq.Broker:\n    retry = Retry(default_backoff(), retries=50)\n    redis_pool = redis.ConnectionPool.from_url(\n        settings.redis_url,\n        client_name=f\"{settings.ENV.value}.worker.dramatiq\",\n        retry=retry,\n        retry_on_error=REDIS_RETRY_ON_ERRROR,\n        socket_timeout=10,\n        socket_connect_timeout=3,\n    )\n\n    result_backend = ResultsBackend(\n        encoder=JSONEncoder(),\n        client=SyncFailoverRedis(\n            connection_pool=redis.ConnectionPool.from_url(\n                settings.redis_url,\n                retry=retry,\n                retry_on_error=REDIS_RETRY_ON_ERRROR,\n                socket_timeout=10,\n                socket_connect_timeout=3,\n            )\n        ),\n    )\n    rate_limiter_backend = RateLimiterBackend(\n        client=SyncFailoverRedis(\n            connection_pool=redis.ConnectionPool.from_url(\n                settings.redis_url,\n                retry=retry,\n                retry_on_error=REDIS_RETRY_ON_ERRROR,\n                socket_timeout=10,\n                socket_connect_timeout=3,\n            )\n        )\n    )\n\n    middleware_list = [\n        # Infrastructure & async support\n        middleware.ShutdownNotifications(),\n        MonitoredAsyncIO(),\n        # Results backend for pipeline/group support\n        Results(backend=result_backend, result_ttl=60_000),\n        # Group completion callbacks for orchestrating task sequences\n        GroupCallbacks(rate_limiter_backend),\n        # Resource lifecycle (worker boot/shutdown)\n        *([SQLAlchemyMiddleware()] if database else []),\n        RedisMiddleware(),\n        HTTPXMiddleware(),\n        HealthMiddleware(database=database),\n        scheduler_middleware,\n        # Observability (outer layer for message processing)\n        LogContextMiddleware(),\n        LogfireMiddleware(),\n        PrometheusMiddleware(),\n        # Message flow control\n        DebounceMiddleware(redis_pool),\n        # Retry & execution control (MaxRetries must precede Retries)\n        OperationalErrorMiddleware(),\n        MaxRetriesMiddleware(),\n        middleware.Retries(\n            max_retries=settings.WORKER_MAX_RETRIES,\n            min_backoff=settings.WORKER_MIN_BACKOFF_MILLISECONDS,\n        ),\n        middleware.AgeLimit(),\n        middleware.TimeLimit(time_limit=TASK_TIME_LIMIT_DEFAULT_MS),\n        middleware.CurrentMessage(),\n    ]\n\n    broker = RoutingRedisBroker(\n        connection_pool=redis_pool,\n        client=SyncFailoverRedis(connection_pool=redis_pool),\n        middleware=middleware_list,\n        dead_message_ttl=3600 * 1000,  # 1 hour in milliseconds\n    )\n\n    return broker\n",
      "asOf": "2026-11-20"
    },
    "F256": {
      "label": "Project source file, dramatiq",
      "display": "server/polar/worker/_broker.py",
      "asOf": "2026-11-20"
    },
    "F257": {
      "label": "Project full_name, dramatiq",
      "display": "polarsource/polar",
      "asOf": "2026-11-20"
    },
    "F258": {
      "label": "Project stargazers_count, dramatiq",
      "display": "10.5K",
      "asOf": "2026-11-20"
    },
    "F259": {
      "label": "Library name, django-rq",
      "display": "django-rq",
      "asOf": "2026-11-20"
    },
    "F260": {
      "label": "Monthly downloads, django-rq",
      "display": "931.3K",
      "asOf": "2026-11-20"
    },
    "F261": {
      "label": "License, django-rq",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F262": {
      "label": "Package release, django-rq",
      "display": "4.2.0",
      "asOf": "2026-11-20"
    },
    "F263": {
      "label": "Package release date, django-rq",
      "display": "Aug 2026",
      "asOf": "2026-11-20"
    },
    "F264": {
      "label": "Install, django-rq",
      "display": "python -m pip install django-rq",
      "asOf": "2026-11-20"
    },
    "F265": {
      "label": "Quickstart, django-rq",
      "display": "import django_rq\n\nqueue = django_rq.get_queue(\"default\")\njob = queue.enqueue(\"math.floor\", 2.7)\n",
      "asOf": "2026-11-20"
    },
    "F266": {
      "label": "Official description, django-rq",
      "display": "Integrates RQ with Django.",
      "asOf": "2026-11-20"
    },
    "F267": {
      "label": "Quickstart source file, django-rq",
      "display": "README.rst",
      "asOf": "2026-11-20"
    },
    "F268": {
      "label": "Repository stars, django-rq",
      "display": "2.0K",
      "asOf": "2026-11-20"
    },
    "F269": {
      "label": "Redis queue transport, django-rq",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F270": {
      "label": "RabbitMQ queue transport, django-rq",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F271": {
      "label": "Queue and execution role, django-rq",
      "display": "Django queue/settings/admin/worker integration over RQ; shares the underlying engine rather than being an independent queue implementation.",
      "asOf": "2026-11-20"
    },
    "F272": {
      "label": "First-call runtime prerequisites, django-rq",
      "display": "Initialized Django project with django_rq in INSTALLED_APPS and RQ_QUEUES.default configured for reachable Redis/Valkey-compatible server. Run in the project shell; start python manage.py rqworker default separately. math.floor is importable by the worker; no invented __main__ task or generation step. Returned object is underlying rq.Job,not completed job value.",
      "asOf": "2026-11-20"
    },
    "F273": {
      "label": "External function contract, django-rq",
      "display": "Current4.2 get_queue(name) returns a native rq.Queue according to own public integration contract; queue.enqueue_call is therefore an explicitly declared underlying RQ public queue operation,not an independently implemented DjangoRQ engine. It accepts func,args,retry,failure_ttl,and depends_on. Current RQ3.0 supports those exact enqueue_call/Retry fields. Native RQ Retry is a peer configuration constructor and is not counted as a third DjangoRQ operation. Actual named Django RQ queue settings and send_webhook callable must be configured. get_queue returns a configured Queue; enqueue_call returns rq.Job,but original returns None/discards it. Does not wait for execution or validate actual webhook delivery. Redis retries and application queue policy are preserved; current function review does not certify the full CVAT historical Django/RQ host stack.",
      "asOf": "2026-11-20"
    },
    "F274": {
      "label": "Shared RQ engine, django-rq",
      "display": "Framework integration facade over RQ; own package4.2.0 requires rq>=2.6.1 and can use current3.0.0 public queue methods. Broad counters overlap conceptually and are never pooled or called independent task-engine adoption.",
      "asOf": "2026-11-20"
    },
    "F275": {
      "label": "Project function, django-rq",
      "display": "def add_to_queue(\n    webhook: Webhook,\n    payload: dict,\n    redelivery: bool = False,\n    depends_on: JobDependencyType | None = None,\n) -> None:\n    from .tasks import send_webhook\n\n    queue = django_rq.get_queue(settings.CVAT_QUEUES.WEBHOOKS.value)\n    retry_intervals = settings.SEND_WEBHOOK_TASK_RETRIES\n    queue.enqueue_call(\n        func=send_webhook,\n        args=(webhook.id, payload, redelivery),\n        retry=Retry(max=len(retry_intervals), interval=retry_intervals),\n        failure_ttl=7 * 24 * 60 * 60,\n        depends_on=depends_on,\n    )\n",
      "asOf": "2026-11-20"
    },
    "F276": {
      "label": "Project source file, django-rq",
      "display": "cvat/apps/webhooks/dispatch.py",
      "asOf": "2026-11-20"
    },
    "F277": {
      "label": "Project full_name, django-rq",
      "display": "cvat-ai/cvat",
      "asOf": "2026-11-20"
    },
    "F278": {
      "label": "Project stargazers_count, django-rq",
      "display": "17.2K",
      "asOf": "2026-11-20"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best Python task queue libraries Celery RQ Dramatiq arq code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
