用户工具

站点工具


django:package:huey

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

django:package:huey [2025/07/02 06:19] – 创建 bestonydjango:package:huey [2025/07/02 06:19] (当前版本) bestony
行 8: 行 8:
  
 <code copy Bash [enable_line_numbers="true"]>'huey.contrib.djhuey',</code> <code copy Bash [enable_line_numbers="true"]>'huey.contrib.djhuey',</code>
 +
 +===== settings =====
 +
 +<code copy Bash [enable_line_numbers="true"]>HUEY = {
 +    "huey_class": "huey.RedisHuey",  # Huey implementation to use.
 +    "name": DATABASES["default"]["NAME"],  # Use db name for huey.
 +    "results": True,
 +    "store_none": False,
 +    "immediate": DEBUG,
 +    "utc": True,
 +    "blocking": True,  # Perform blocking pop rather than poll Redis.
 +    "connection": {
 +        "host": "localhost",
 +        "port": 6379,
 +        "db": 0,
 +        "connection_pool": None,  # Definitely you should use pooling!
 +        # ... tons of other options, see redis-py for details.
 +        # huey-specific connection parameters.
 +        "read_timeout": 1,  # If not polling (blocking pop), use timeout.
 +        "url": None,  # Allow Redis config via a DSN.
 +    },
 +    "consumer": {
 +        "workers": 1,
 +        "worker_type": "thread",
 +        "initial_delay": 0.1,  # Smallest polling interval, same as -d.
 +        "backoff": 1.15,  # Exponential backoff using this rate, -b.
 +        "max_delay": 10.0,  # Max possible polling interval, -m.
 +        "scheduler_interval": 1,  # Check schedule every second, -s.
 +        "periodic": True,  # Enable crontab feature.
 +        "check_worker_health": True,  # Enable worker health checks.
 +        "health_check_interval": 1,  # Check worker health every second.
 +    },
 +}</code>
 +
/storage/data/attic/django/package/huey.1751437153.txt.gz · 最后更改: bestony

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki