Skip to content

Commit

Permalink
fix: switch to debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dreulavelle committed Nov 14, 2024
1 parent 726f3b5 commit d140838
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/program/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,12 @@ def _update_ongoing(self) -> None:
with db.Session() as session:
item_ids = session.execute(
select(MediaItem.id)
.where(MediaItem.type.in_(["movie", "show"]))
.where(MediaItem.type.in_(["movie", "episode"]))
.where(MediaItem.last_state.in_([States.Ongoing, States.Unreleased]))
).scalars().all()

if not item_ids:
logger.log("PROGRAM", "No ongoing or unreleased items to update.")
logger.debug("PROGRAM", "No ongoing or unreleased items to update.")
return

logger.debug(f"Updating state for {len(item_ids)} ongoing and unreleased items.")
Expand All @@ -243,7 +243,7 @@ def _update_ongoing(self) -> None:
except Exception as e:
logger.error(f"Failed to update state for item with ID {item_id}: {e}")

logger.log("PROGRAM", f"Found {counter} items with updated state.")
logger.debug("PROGRAM", f"Found {counter} items with updated state.")

def _schedule_functions(self) -> None:
"""Schedule each service based on its update interval."""
Expand Down

0 comments on commit d140838

Please sign in to comment.