From 795682484cd310fd9ab7c3f3792c45f70652177a Mon Sep 17 00:00:00 2001 From: deflax Date: Sun, 7 Jan 2024 03:25:53 +0200 Subject: [PATCH] handle removing missing job ids --- src/scheduler/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scheduler/app.py b/src/scheduler/app.py index c142567..c2b2ddc 100644 --- a/src/scheduler/app.py +++ b/src/scheduler/app.py @@ -72,7 +72,10 @@ def remove_channel_from_database(database, scheduler, stream_id, stream_name, st if stream_id in database: logger_job.info(f'{stream_id} ({stream_name}) has been removed from the database. Reason: {state.exec}') database.pop(stream_id) - scheduler.remove_job(stream_id) + try: + scheduler.remove_job(stream_id) + except scheduler.jobstores.base.JobLookupError as je: + logger_job.error(je) # Helper function to find match a stream name with epg.json def find_event_entry(events, target_name):