# Save the build time.
self.build_time = int(time.time())
+ def setup_signal_handlers(self):
+ pass
+
def start(self):
# Mount the directories.
self._mountall()
class PakfireBuilderClient(BuildMixin, PakfireClient):
type = "builder"
- def send_keepalive(self, overload=None, free_space=None):
+ def send_keepalive(self, force=False, overload=None, free_space=None):
"""
Sends a little keepalive to the server and
updates the hardware information if the server
needs_update = self.conn.send_keepalive(loadavg, overload, free_space)
- if needs_update:
+ if force or needs_update:
log.debug("The hub is requesting an update.")
self.send_update()
self._last_keepalive = 0
# Send an initial keepalive message.
- self.send_keepalive()
+ self.send_keepalive(force=True)
def run(self, heartbeat=1, max_processes=None):
# By default do not start more than two processes per CPU core.
# a new job.
return load5 >= system.cpu_count * 2
- def send_keepalive(self):
+ def send_keepalive(self, force=False):
"""
When triggered, this method sends a keepalive to the hub.
"""
return
kwargs = {
+ "force" : force,
"overload" : self.has_overload(),
"free_space" : self.free_space / 1024**2,
}