mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-27 06:21:28 +00:00
7935de0fe1
Co-authored-by: inexcode <inex.code@selfprivacy.org> Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api/pulls/13
15 lines
281 B
Python
15 lines
281 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",
|
|
)
|