2022-08-25 17:03:56 +00:00
|
|
|
"""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",
|
2023-07-20 16:39:10 +00:00
|
|
|
utc=True,
|
2022-08-25 17:03:56 +00:00
|
|
|
)
|