mirror of
https://github.com/Kunsi/scheduled-plugin-pretalx-broadcast-tools.git
synced 2025-05-09 06:34:06 +00:00
support all kinds of node names
This commit is contained in:
parent
80777081c3
commit
aba29ffa52
2 changed files with 4 additions and 6 deletions
6
service
6
service
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/python
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import traceback
|
||||
|
@ -11,6 +12,8 @@ from hosted import config, node
|
|||
|
||||
config.restart_on_update()
|
||||
|
||||
SEND_PREFIX = os.environ["NODE"].replace("root/", "root/plugin/")
|
||||
|
||||
|
||||
def log(msg):
|
||||
sys.stderr.write("[pretalx] {}\n".format(msg))
|
||||
|
@ -39,8 +42,7 @@ def idle(seconds, event_start, event_tz):
|
|||
send_data["day"] = day_info.days
|
||||
|
||||
for k, v in send_data.items():
|
||||
node.send_raw("root/plugin/pretalx/{}:{}".format(k, v))
|
||||
node.send_raw("root/plugin/pretalx-broadcast-tools/{}:{}".format(k, v))
|
||||
node.send_raw("{}/{}:{}".format(SEND_PREFIX, k, v))
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue