1
0
mirror of https://git.sr.ht/~tsileo/microblog.pub synced 2025-06-05 21:59:23 +02:00

Various bugfixes

This commit is contained in:
Thomas Sileo
2022-07-05 08:14:50 +02:00
parent 9012356a19
commit e6066cb212
5 changed files with 25 additions and 14 deletions

View File

@ -83,9 +83,10 @@ def process_next_outgoing_activity(db: Session) -> bool:
models.OutgoingActivity.is_sent.is_(False),
]
q_count = db.scalar(select(func.count(models.OutgoingActivity.id)).where(*where))
logger.info(f"{q_count} outgoing activities ready to process")
if q_count > 0:
logger.info(f"{q_count} outgoing activities ready to process")
if not q_count:
logger.info("No activities to process")
# logger.debug("No activities to process")
return False
next_activity = db.execute(