diff --git a/api/obs/api/process.py b/api/obs/api/process.py index 12665fc..338d7a2 100644 --- a/api/obs/api/process.py +++ b/api/obs/api/process.py @@ -61,7 +61,7 @@ async def process_tracks(data_source, tracks): :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: track = ( await session.execute( diff --git a/api/tools/process_track.py b/api/tools/process_track.py index 702ae28..76d12ad 100755 --- a/api/tools/process_track.py +++ b/api/tools/process_track.py @@ -44,8 +44,7 @@ async def main(): data_source = DataSource(tile_source) if args.tracks: - async with make_session() as session: - await process_tracks(session, data_source, args.tracks) + await process_tracks(data_source, args.tracks) else: await process_tracks_loop(data_source, args.loop_delay)