Skip to content

Commit

Permalink
[#140] logging the actual exception message for triggers and schedule…
Browse files Browse the repository at this point in the history
…r jobs
  • Loading branch information
pkdash committed Jun 4, 2024
1 parent 9ac1d04 commit 99671ee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions triggers/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ async def do_daily():
else:
# couldn't retrieve matching repository record
await db["discovery"].delete_one({"_id": submission.identifier})
except:
logger.exception(f"Failed to collect submission {submission.url}")
except Exception as exp:
logger.exception(f"Failed to collect submission {submission.url}, Error: {str(exp)}")


def main():
Expand Down
4 changes: 2 additions & 2 deletions triggers/update_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ async def _main():
while True:
try:
await watch_catalog(db)
except:
logger.exception("Submission Watch Task failed, restarting the task")
except Exception as exp:
logger.exception(f"Submission Watch Task failed. Error:{str(exp)}, restarting the task")
finally:
db.close()

Expand Down
4 changes: 2 additions & 2 deletions triggers/update_typeahead.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ async def _main():
while True:
try:
await watch_discovery(db)
except:
logger.exception("Discovery Watch Task failed, restarting the task")
except Exception as exp:
logger.exception(f"Discovery Watch Task failed. Error:{str(exp)}, restarting the task")
finally:
db.close()

Expand Down

0 comments on commit 99671ee

Please sign in to comment.