|
90 | 90 | "css": ["compressor.filters.cssmin.rCSSMinFilter"], |
91 | 91 | "js": ["compressor.filters.jsmin.JSMinFilter"], |
92 | 92 | } |
93 | | -HUEY_FILENAME = os.path.join(DATA_DIR, "bg_tasks.sqlite3") |
94 | 93 | HUEY = { |
95 | | - "name": "huey", # DB name for huey. |
96 | | - "huey_class": "huey.SqliteHuey", # Huey implementation to use. |
97 | | - "filename": HUEY_FILENAME, # Sqlite filename |
98 | | - "results": True, # Whether to return values of tasks. |
99 | | - "store_none": False, # Whether to store results of tasks that return None. |
100 | | - "immediate": False, # If True, run tasks synchronously. |
101 | | - "strict_fifo": True, # Utilize Sqlite AUTOINCREMENT to have unique task IDs |
102 | | - "timeout": 10, # Seconds to wait when reading from the DB. |
103 | | - "connection": { |
104 | | - "isolation_level": "IMMEDIATE", # Use immediate transactions to allow sqlite to respect `timeout`. |
105 | | - "cached_statements": 2000, # Number of pages to keep in memory. |
106 | | - }, |
| 94 | + "name": "huey", |
| 95 | + "huey_class": "huey.FileHuey", |
| 96 | + "path": os.path.join(DATA_DIR, "tasks"), |
| 97 | + "immediate": False, |
| 98 | + "use_thread_lock": True, |
107 | 99 | "consumer": { |
108 | 100 | "workers": os.cpu_count() or 8, # Number of worker processes/threads. |
109 | | - "worker_type": "thread", # "thread" or "process" |
110 | 101 | "initial_delay": 0.25, # Smallest polling interval |
111 | | - "check_worker_health": True, # Whether to monitor worker health. |
112 | 102 | }, |
113 | 103 | } |
114 | 104 |
|
|
0 commit comments