Skip to content

Commit

Permalink
Dont update heartbeat on uworkers (#3945)
Browse files Browse the repository at this point in the history
It isn't needed or possible due to lack of permissions.
  • Loading branch information
jonathanmetzman committed Apr 22, 2024
1 parent 39b4dae commit dff1c77
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/clusterfuzz/_internal/datastore/data_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,10 @@ def _try_update_status():

def update_heartbeat(force_update=False):
"""Updates heartbeat with current timestamp and log data."""
if environment.is_uworker():
# Uworkers can't update heartbeats.
return 0

# Check if the heartbeat was recently updated. If yes, bail out.
last_modified_time = persistent_cache.get_value(
HEARTBEAT_LAST_UPDATE_KEY, constructor=datetime.datetime.utcfromtimestamp)
Expand Down

0 comments on commit dff1c77

Please sign in to comment.