mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-05 07:17:52 +10:00
add SQLite semaphore mockup
This commit is contained in:
@@ -36,6 +36,7 @@ class BaseQueue(BaseHook):
|
||||
return AttrDict(all_tasks)
|
||||
|
||||
def get_huey_config(self, settings) -> dict:
|
||||
"""Get the config dict to insert into django.conf.settings.DJANGO_HUEY['queues']."""
|
||||
return {
|
||||
"huey_class": "huey.SqliteHuey",
|
||||
"filename": settings.QUEUE_DATABASE_NAME,
|
||||
@@ -58,6 +59,7 @@ class BaseQueue(BaseHook):
|
||||
}
|
||||
|
||||
def get_supervisor_config(self, settings) -> dict:
|
||||
"""Ge the config dict used to tell sueprvisord to start a huey consumer for this queue."""
|
||||
return {
|
||||
"name": f"worker_{self.name}",
|
||||
"command": f"archivebox manage djangohuey --queue {self.name}",
|
||||
|
||||
@@ -63,7 +63,7 @@ def convert(ini_str: str) -> str:
|
||||
|
||||
### Basic Assertions
|
||||
|
||||
test_input = """
|
||||
test_input = r"""
|
||||
[SERVER_CONFIG]
|
||||
IS_TTY=False
|
||||
USE_COLOR=False
|
||||
@@ -225,7 +225,7 @@ NODE_VERSION=v21.7.3
|
||||
"""
|
||||
|
||||
|
||||
expected_output = '''[SERVER_CONFIG]
|
||||
expected_output = r'''[SERVER_CONFIG]
|
||||
IS_TTY = false
|
||||
USE_COLOR = false
|
||||
SHOW_PROGRESS = false
|
||||
|
||||
Reference in New Issue
Block a user