Spaces:
Running
Running
File size: 311 Bytes
302fbfe |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import json
import sys
from datetime import datetime
def log(message):
timestamp = datetime.now().strftime("%H:%M:%S")
print(f"[{timestamp}] {message}")
sys.stdout.flush()
def save_service_config(config):
with open("service_config.json", "w") as f:
json.dump(config.data, f, indent=2)
|