Whereas the wiki describes Code structure and flow for the imps there isn’t too much in the way of conceptual description of Agents. Observing my Agents they obviously don’t sleep like an imp but they idle for events. Assuming my assumptions are correct I’ve drawn an Agent sate diagram to reflect my understating?
A few questions though
On an imp: "Only one event handler can execute at a time, so colliding events will be queued."
Is this the case for Agents?
What is buffer sizes for inbound
a: http requests
b: devcie.on requests
It’s still not clear to me under what conditions an Agent re-starts.
Thanks as always
I am also interested in the answer to this. At the moment, my mental picture is that the “Boot” process is triggered by the imp powering up and connecting to the cloud server on its own. The server then instantiates the agent and gives it control.
- Is this a valid assumption?
- What happens if the server reboots? Does it automatically reinstantiate agents that were up at the time?
Hugo thanks, Just one more …
Will a imp warm re-boot load & run a pending Agent update?
Updated digram attached.
There shouldn’t be pending agent updates - when you hit run, it should restart the agent with the new code immediately?
Ok all my imps are deep sleeping the Agent will only update when I comment out the server sleepfor and cold boot.
Also when you “Run” a update to an Agent and the imp is offline the Agent won’t update till the imp is back on-line.
I believe the deepsleep not Agent update is a bug. But the imp offline then updating makes sense & so there’s a sort of pending state between hitting ide-run & imp coming on-line.
Ah, yes. That is indeed a bug - agents don’t get updates unless the imp is online. It’s not meant to be like that though