mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-23 13:36:35 +00:00
Create huey.py
This commit is contained in:
parent
18e506a703
commit
15d4a8f4e4
19
tubesync/common/huey.py
Normal file
19
tubesync/common/huey.py
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
|
||||
def sqlite_tasks(key, /, prefix=None):
|
||||
name_fmt = 'huey_{}'
|
||||
if prefix is None:
|
||||
prefix = ''
|
||||
if prefix:
|
||||
name_fmt = f'huey_{prefix}_' + '{}'
|
||||
name = name_fmt.format(key)
|
||||
return dict(
|
||||
huey_class='huey.SqliteHuey',
|
||||
name=name,
|
||||
connection=dict(
|
||||
filename=f'/config/tasks/{name}.db',
|
||||
fsync=True,
|
||||
strict_fifo=True,
|
||||
),
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user