MCPcopy
hub / github.com/apache/caldera / heartbeat_modification

Method heartbeat_modification

app/objects/c_agent.py:191–214  ·  view source on GitHub ↗
(self, **kwargs)

Source from the content-addressed store, hash-verified

189 return potential_executors[0]
190
191 async def heartbeat_modification(self, **kwargs):
192 now = datetime.now(timezone.utc)
193 self.last_seen = now
194 if self.trusted:
195 self.last_trusted_seen = now
196 self.update('pid', kwargs.get('pid'))
197 self.update('ppid', kwargs.get('ppid'))
198 self.update('server', kwargs.get('server'))
199 self.update('exe_name', kwargs.get('exe_name'))
200 self.update('location', kwargs.get('location'))
201 self.update('privilege', kwargs.get('privilege'))
202 self.update('host', kwargs.get('host'))
203 self.update('username', kwargs.get('username'))
204 self.update('architecture', kwargs.get('architecture'))
205 self.update('platform', kwargs.get('platform'))
206 self.update('proxy_receivers', kwargs.get('proxy_receivers'))
207 self.update('proxy_chain', kwargs.get('proxy_chain'))
208 self.update('deadman_enabled', kwargs.get('deadman_enabled'))
209 self.update('contact', kwargs.get('contact'))
210 self.update('host_ip_addrs', kwargs.get('host_ip_addrs'))
211 self.update('upstream_dest', kwargs.get('upstream_dest'))
212 if not self._executor_change_to_assign:
213 # Don't update executors if we're waiting to assign an executor change to the agent.
214 self.update('executors', kwargs.get('executors'))
215
216 async def gui_modification(self, **kwargs):
217 loaded = AgentFieldsSchema(only=('group', 'trusted', 'sleep_min', 'sleep_max', 'watchdog', 'pending_contact')).load(kwargs)

Calls 1

updateMethod · 0.80