add a little boot-up message

workspace
Brendan Howell 4 years ago
parent 33e3716ed7
commit 4e828c4e95

@ -32,7 +32,15 @@ class InhumanResources(Bureau):
self.webthread = threading.Thread(target=self.webapp.run, self.webthread = threading.Thread(target=self.webapp.run,
kwargs=webargs, daemon=True) kwargs=webargs, daemon=True)
self.webthread.start() self.webthread.start()
# update_commands(self)
def start_msg():
msg = "HELLO WORLD\r\n\r\nAVAILABLE BUREAUS:\r\n"
for prefix in self.menu.keys():
msg += " " + self.menu[prefix]["name"] + " (" + prefix + ")\r\n"
self.print_small(msg)
self.print_my_ip()
msgtimer = threading.Timer(10, start_msg) # wait for the other bureux
@add_api("addbureau", "Register Bureau") @add_api("addbureau", "Register Bureau")
def add_bureau(self, data): def add_bureau(self, data):
@ -174,5 +182,4 @@ def main():
hr.run() hr.run()
if __name__ == "__main__": if __name__ == "__main__":
hr = InhumanResources() main()
hr.run()

Loading…
Cancel
Save