Skip to content

Commit

Permalink
Fix if statement (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattops authored Aug 7, 2024
1 parent 7909b5e commit 2199c08
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion health_ping.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ def update_app_version(app_version, c_name, e_name, github_repo):
if latest_version_from_redis != app_version:
app_version_sha = app_version.split('.')[-1]
# If we have a previously deployed version - get the git commits since.
if previous_deployed_version_key:
if isinstance(previous_deployed_version_key, int):
previous_deployed_version = versions_history[previous_deployed_version_key][1]['v']
previous_deployed_version_sha = previous_deployed_version.split('.')[-1]
commits = git_compare_commits(github_repo, previous_deployed_version_sha, app_version_sha)
log.info(f"Fetching commits for build: {app_version}")
version_data.update({'git_compare': json.dumps(commits)})
redis.xadd(version_key, version_data, maxlen=200, approximate=False)
log.info(f'Updating redis stream with new version. {version_key} = {version_data}')
Expand Down

0 comments on commit 2199c08

Please sign in to comment.