pb.Connection.doKeepalive() is not called in loop
- Dominant language
- Python
- Stars
- 5.5k
- Forks
- 1.7k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 6
Description
Hello. I'm using 0.9.11
I'm working on case when latent worker is killed. For example vm with worker stopped.
And I have found that in this case master continue to think that worker is ok (build is not
failed).
There is a doKeepalive procedure in pb.Connection class, but
1) It is called once with reactor.callLater(). I think that it is better to call it in loop
to check periodically if worker is online.
2) I haven't found what happens if there is no answer from worker
3) keepalive_timer value is hardcoded. I think that there could be two places for this value -
global in config (as mentioned in comments) and in worker parameters
doKeepalive() returns Deffered. I added timeout to it with loseConnection callback like this:
```
def doKeepalive(self):
d = self.mind.callRemote('print', message="keepalive")
d.addTimeout(30, reactor, lambda x, y: self.loseConnection())
return d
```
Is it ok or maybe there is another solution for this case? I can prepare PR.
Please correct me if I'm wrong
Contributor guide
Assessment
This issue has not been assessed yet.