fix: proces_track utility
This commit is contained in:
parent
ea6a631560
commit
bde1b77b48
|
@ -61,7 +61,7 @@ async def process_tracks(data_source, tracks):
|
||||||
|
|
||||||
:param tracks: A list of strings which
|
:param tracks: A list of strings which
|
||||||
"""
|
"""
|
||||||
with make_session() as session:
|
async with make_session() as session:
|
||||||
for track_id_or_slug in tracks:
|
for track_id_or_slug in tracks:
|
||||||
track = (
|
track = (
|
||||||
await session.execute(
|
await session.execute(
|
||||||
|
|
|
@ -44,8 +44,7 @@ async def main():
|
||||||
data_source = DataSource(tile_source)
|
data_source = DataSource(tile_source)
|
||||||
|
|
||||||
if args.tracks:
|
if args.tracks:
|
||||||
async with make_session() as session:
|
await process_tracks(data_source, args.tracks)
|
||||||
await process_tracks(session, data_source, args.tracks)
|
|
||||||
else:
|
else:
|
||||||
await process_tracks_loop(data_source, args.loop_delay)
|
await process_tracks_loop(data_source, args.loop_delay)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue