From a575c9cea0a452e26e6ef91ebdd9896b01da0be7 Mon Sep 17 00:00:00 2001 From: Brendan Howell Date: Mon, 1 Aug 2016 19:45:11 +0200 Subject: [PATCH] commands for restructuring and furlough --- screenless/bureau/ihr/ihr.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/screenless/bureau/ihr/ihr.py b/screenless/bureau/ihr/ihr.py index 69f215b..f1fcd82 100644 --- a/screenless/bureau/ihr/ihr.py +++ b/screenless/bureau/ihr/ihr.py @@ -1,4 +1,5 @@ import json +import subprocess import code128 @@ -89,6 +90,29 @@ class InhumanResources(Bureau): """ self.print_full("menu.html", menu=self.menu) + @add_command("update", "Restructure Organization") + def update(self): + """ + Restructure the organization. This may include firing, hiring, + refinancing and organizational changes. This will update the + Office to the latest software but it may be disruptive to your + current personal and social situation. After pulling the latest + updates, all bureaus other than management will be restarted. + """ + subprocess.call("git pull") + self.restart() + + @add_command("restart", "Furlough") + def restart(self): + """ + Send the entire organization on a very short unpaid vacation. This + will restart all bureaus, so it may cause disruption, loss of work + and other psycho-social side effects of a loss of state. It may + also help restore a messed up office to normal operation. + """ + # TODO: find the PID of mgmt and send it a HUP signal + pass + def main(): hr = InhumanResources()