Push on every refresh
This commit is contained in:
parent
8cd62b46ed
commit
900f476712
1 changed files with 6 additions and 7 deletions
13
wifi-mqtt.py
13
wifi-mqtt.py
|
@ -88,13 +88,12 @@ if __name__ == '__main__':
|
||||||
continue
|
continue
|
||||||
|
|
||||||
diff = activity.diff(prev_activity)
|
diff = activity.diff(prev_activity)
|
||||||
if len(diff['joined']) > 0 or len(diff['parted']) > 0:
|
hooks = [
|
||||||
hooks = [
|
# hook_print,
|
||||||
# hook_print,
|
hook_mqtt,
|
||||||
hook_mqtt,
|
]
|
||||||
]
|
for hook in hooks:
|
||||||
for hook in hooks:
|
hook(activity, prev_activity, diff)
|
||||||
hook(activity, prev_activity, diff)
|
|
||||||
|
|
||||||
prev_activity = activity
|
prev_activity = activity
|
||||||
time.sleep(30)
|
time.sleep(30)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue