Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
Do not fail jobs when db connection is not alive
Browse files Browse the repository at this point in the history
  • Loading branch information
joepvd committed May 16, 2023
1 parent e1e872b commit 12f8aa6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doozerlib/distgit.py
Expand Up @@ -1165,6 +1165,10 @@ def update_build_db(self, success_flag, task_id=None, scratch=False):
if scratch:
return

if not self.runtime.db:
self.logger.error('Database connection is not initialized, skipping writing record.')
return

with Dir(self.distgit_dir):
commit_sha = exectools.cmd_assert('git rev-parse HEAD')[0].strip()[:8]
invoke_ts = str(int(round(time.time() * 1000)))
Expand Down

0 comments on commit 12f8aa6

Please sign in to comment.