mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-24 04:51:27 +00:00
17 lines
351 B
Python
17 lines
351 B
Python
"""MiniHuey singleton."""
|
|
import os
|
|
from huey import SqliteHuey
|
|
|
|
HUEY_DATABASE = "/etc/selfprivacy/tasks.db"
|
|
|
|
# Singleton instance containing the huey database.
|
|
|
|
test_mode = os.environ.get("TEST_MODE")
|
|
|
|
huey = SqliteHuey(
|
|
"selfprivacy-api",
|
|
filename=HUEY_DATABASE if not test_mode else None,
|
|
immediate=test_mode == "true",
|
|
utc=True,
|
|
)
|