Skip to content

Commit

Permalink
Fix bug with duplicates being added to redis stream (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattops authored Aug 7, 2024
1 parent 2199c08 commit 719d54f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions health_ping.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@ def update_app_version(app_version, c_name, e_name, github_repo):
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}')
else:
# Must be first time entry.
redis.xadd(version_key, version_data, maxlen=200, approximate=False)
redis.json().set('latest:versions', f'$.{version_key}', version_data)
log.debug(f"First version entry = {version_key}:{version_data}")
return

# Always update the latest version key
redis.json().set('latest:versions', f'$.{version_key}', version_data)
Expand Down

0 comments on commit 719d54f

Please sign in to comment.