nixos/buildbot: enable configurable keepalive for buildbot worker
In the current implementation, there's no possibility to modify the default parameter for keepalive. This is a number that indicates how frequently keepalive messages should be sent from the worker to the buildmaster, expressed in seconds. The default (600) causes a message to be sent to the buildmaster at least once every 10 minutes. If the worker is behind a NAT box or stateful firewall, these messages may help to keep the connection alive: some NAT boxes tend to forget about a connection if it has not been used in a while. When this happens, the buildmaster will think that the worker has disappeared, and builds will time out. Meanwhile the worker will not realize than anything is wrong.
This commit is contained in:
parent
21104fcabd
commit
d53d13b6ee
1 changed files with 10 additions and 1 deletions
|
@ -29,7 +29,7 @@ let
|
||||||
|
|
||||||
with open('${cfg.workerPassFile}', 'r', encoding='utf-8') as passwd_file:
|
with open('${cfg.workerPassFile}', 'r', encoding='utf-8') as passwd_file:
|
||||||
passwd = passwd_file.read().strip('\r\n')
|
passwd = passwd_file.read().strip('\r\n')
|
||||||
keepalive = 600
|
keepalive = ${toString cfg.keepalive}
|
||||||
umask = None
|
umask = None
|
||||||
maxdelay = 300
|
maxdelay = 300
|
||||||
numcpus = None
|
numcpus = None
|
||||||
|
@ -116,6 +116,15 @@ in {
|
||||||
description = "Specifies the Buildbot Worker connection string.";
|
description = "Specifies the Buildbot Worker connection string.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
keepalive = mkOption {
|
||||||
|
default = 600;
|
||||||
|
type = types.int;
|
||||||
|
description = "
|
||||||
|
This is a number that indicates how frequently keepalive messages should be sent
|
||||||
|
from the worker to the buildmaster, expressed in seconds.
|
||||||
|
";
|
||||||
|
};
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
default = pkgs.python3Packages.buildbot-worker;
|
default = pkgs.python3Packages.buildbot-worker;
|
||||||
|
|
Loading…
Reference in a new issue