Skip to content

Commit

Permalink
Improves debugging messages in term scheduled job (#2339)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvilanova authored Jul 8, 2022
1 parent 49c2f54 commit 8e1d7a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dispatch/term/scheduled.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import logging

from schedule import every
from dispatch.database.core import SessionLocal

from dispatch.database.core import SessionLocal
from dispatch.decorators import scheduled_project_task
from dispatch.plugin import service as plugin_service
from dispatch.project.models import Project
Expand All @@ -28,11 +28,11 @@ def sync_terms(db_session: SessionLocal, project: Project):
)

if not term_plugin:
log.warning(f"Skipping term sync no term plugin enabled. ProjectId: {project.id}")
log.warning(f"Skipping syncing terms. No term plugin enabled. Project Id: {project.id}")
return

for t in term_plugin.instance.get():
log.debug(f"Adding Term. Term: {t}")
log.debug(f"Adding term {t} to {project.name} project.")
term_in = TermCreate(**t)
term = term_service.get_by_text(db_session=db_session, text=term_in.text)

Expand Down

0 comments on commit 8e1d7a5

Please sign in to comment.