Handle receptorctl advertisements for hop nodes

counting it towards their heartbeat.  Also, leave off the link to the
health check endpoint from hop node Instances.
This commit is contained in:
Jeff Bradberry
2022-01-24 15:39:54 -05:00
parent 56f8f8d3f4
commit 334c33ca07
3 changed files with 12 additions and 9 deletions

View File

@@ -195,7 +195,7 @@ class Instance(HasPolicyEditsMixin, BaseModel):
if ref_time is None:
ref_time = now()
grace_period = settings.CLUSTER_NODE_HEARTBEAT_PERIOD * 2
if self.node_type == 'execution':
if self.node_type in ('execution', 'hop'):
grace_period += settings.RECEPTOR_SERVICE_ADVERTISEMENT_PERIOD
return self.last_seen < ref_time - timedelta(seconds=grace_period)