Spaces:
Building
Building
File size: 391 Bytes
302fbfe 25a6568 fb3f277 25a6568 fb3f277 302fbfe 25a6568 302fbfe 25a6568 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import json
import sys
from datetime import datetime
CONFIG_FILE = "service_config.json"
def log(message: str):
timestamp = datetime.now().strftime("%H:%M:%S.%f")[:-3]
print(f"[{timestamp}] {message}")
sys.stdout.flush()
def save_service_config(config):
with open(CONFIG_FILE, "w") as f:
json.dump(config.data, f, indent=2)
log("✅ Config saved to disk")
|