OpenCyphal-Garage / cyraft

Raft algorithm (for pycyphal)
2 stars 2 forks source link

Proposal for election watchdog timer #6

Closed maksimdrachov closed 1 year ago

maksimdrachov commented 1 year ago

Is this a good way to implement the election watchdog timer?

I tried to look for the asyncio timer functionality you showed me before, but somehow wasn't able to find it? Most of the examples I've come across seem to use asyncio.sleep in some capacity.

To run the example/unit test: pytest -k _unittest_election_watchdog

maksimdrachov commented 1 year ago

I think this should be correct.

I will now proceed to integrate this approach into RaftNode.