2023-03-28 08:48:09 +00:00

19 lines
476 B
Python
Executable File

#!/usr/bin/env python3
""" This is a test script that saves worker status to json file every second"""
import json
import time
def update_worker_status():
while True:
data = {"status": "READY", "timestamp": int(time.time())}
with open(
"/competition/worker_node_status.json",
"w",
) as statusfile:
statusfile.write(json.dumps(data))
time.sleep(1)
if __name__ == "__main__":
update_worker_status()