diff options
author | Roman Sharapov <dev.Sharapov.Roman@dev.bwater.com> | 2020-07-13 13:07:20 -0400 |
---|---|---|
committer | Roman Sharapov <dev.Sharapov.Roman@dev.bwater.com> | 2020-07-13 13:07:20 -0400 |
commit | d53d13b6ee426932c8a73eb18e56082d1873ff27 (patch) | |
tree | 5075f4fe21ba785a7db67f676aaa5c19309f2867 /nixos/modules/services/continuous-integration/buildbot | |
parent | 21104fcabdb61366db4f9ac9cef0880e813c5ee0 (diff) | |
download | nixlib-d53d13b6ee426932c8a73eb18e56082d1873ff27.tar nixlib-d53d13b6ee426932c8a73eb18e56082d1873ff27.tar.gz nixlib-d53d13b6ee426932c8a73eb18e56082d1873ff27.tar.bz2 nixlib-d53d13b6ee426932c8a73eb18e56082d1873ff27.tar.lz nixlib-d53d13b6ee426932c8a73eb18e56082d1873ff27.tar.xz nixlib-d53d13b6ee426932c8a73eb18e56082d1873ff27.tar.zst nixlib-d53d13b6ee426932c8a73eb18e56082d1873ff27.zip |
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.
Diffstat (limited to 'nixos/modules/services/continuous-integration/buildbot')
-rw-r--r-- | nixos/modules/services/continuous-integration/buildbot/worker.nix | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/nixos/modules/services/continuous-integration/buildbot/worker.nix b/nixos/modules/services/continuous-integration/buildbot/worker.nix index 52f24b8cee3c..7b8a35f54bfa 100644 --- a/nixos/modules/services/continuous-integration/buildbot/worker.nix +++ b/nixos/modules/services/continuous-integration/buildbot/worker.nix @@ -29,7 +29,7 @@ let with open('${cfg.workerPassFile}', 'r', encoding='utf-8') as passwd_file: passwd = passwd_file.read().strip('\r\n') - keepalive = 600 + keepalive = ${toString cfg.keepalive} umask = None maxdelay = 300 numcpus = None @@ -116,6 +116,15 @@ in { 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 { type = types.package; default = pkgs.python3Packages.buildbot-worker; |