This commit is contained in:
2025-12-08 16:08:19 -05:00
parent fa9fabcd9f
commit 5b83fa12ca
14 changed files with 195 additions and 22 deletions

View File

@@ -6,6 +6,7 @@ from tinydb import TinyDB
DB_ENV = os.environ.get('DB_ENV', 'prod')
base_dir = os.path.dirname(__file__)
class LockedTable:
"""
Thread-safe wrapper around a TinyDB table. All callable attribute access
@@ -98,4 +99,5 @@ if DB_ENV == 'test':
task_db.truncate()
reward_db.truncate()
image_db.truncate()
pending_reward_db.truncate()
pending_reward_db.truncate()