handle removing missing job ids

This commit is contained in:
deflax 2024-01-07 03:25:53 +02:00
parent e4bd771275
commit 795682484c

View file

@ -72,7 +72,10 @@ def remove_channel_from_database(database, scheduler, stream_id, stream_name, st
if stream_id in database: if stream_id in database:
logger_job.info(f'{stream_id} ({stream_name}) has been removed from the database. Reason: {state.exec}') logger_job.info(f'{stream_id} ({stream_name}) has been removed from the database. Reason: {state.exec}')
database.pop(stream_id) database.pop(stream_id)
try:
scheduler.remove_job(stream_id) 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 # Helper function to find match a stream name with epg.json
def find_event_entry(events, target_name): def find_event_entry(events, target_name):