save-cloud icon indicating copy to clipboard operation
save-cloud copied to clipboard

Orchestrator should take info about agents status from backend only

Open nulls opened this issue 2 years ago • 2 comments

Orchestrator saves AgentStatus using current timestamp, but creates it when creates a heartbeat.

Also, we save AgentStatus twice: when receives a heartbeat and when sends a response on heartbeat

Suggestions:

  • store two statuses on AgentStatus: current status and new status
  • ~~use timestamp from Heartbeat~~ handled in #1610
  • refactor HeartBeatInspector to take information about agents from backend instead of storing it in orchestrator's memory
  • ~~AgentStatus has two times, but looks like we set them equally~~

    IIRC, end_time is being updated in the DB until status changes, then the new row is inserted with initially start_time == end_time

nulls avatar Dec 13 '22 12:12 nulls

AgentStatus has two times, but looks like we set them equally

IIRC, end_time is being updated in the DB until status changes, then the new row is inserted with initially start_time == end_time

petertrr avatar Dec 13 '22 13:12 petertrr

Can close #11

nulls avatar Jan 10 '23 15:01 nulls