mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-18 16:39:13 +00:00
16 lines
295 B
Python
16 lines
295 B
Python
"""MiniHuey singleton."""
|
|
import os
|
|
from huey import SqliteHuey
|
|
|
|
HUEY_DATABASE = "/etc/nixos/userdata/tasks.db"
|
|
|
|
# Singleton instance containing the huey database.
|
|
|
|
test_mode = os.environ.get("TEST_MODE")
|
|
|
|
huey = SqliteHuey(
|
|
HUEY_DATABASE,
|
|
immediate=test_mode == "true",
|
|
utc=True,
|
|
)
|