Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ SYNC_INTERVAL = 60 # Seconds (Recommended: 60+)
|
|
| 12 |
def sync_logic():
|
| 13 |
"""Background task to sync prices."""
|
| 14 |
while True:
|
| 15 |
-
print(f"π [Background Sync] Starting update at {time.ctime()}...")
|
| 16 |
try:
|
| 17 |
with open(HTML_FILE, 'r', encoding='utf-8') as f:
|
| 18 |
content = f.read()
|
|
@@ -48,9 +48,9 @@ def sync_logic():
|
|
| 48 |
|
| 49 |
with open(HTML_FILE, 'w', encoding='utf-8') as f:
|
| 50 |
f.write(updated_content)
|
| 51 |
-
print("β
[Background Sync] HTML File Updated.")
|
| 52 |
except Exception as e:
|
| 53 |
-
print(f"β [Background Sync] Error: {e}")
|
| 54 |
|
| 55 |
time.sleep(SYNC_INTERVAL)
|
| 56 |
|
|
|
|
| 12 |
def sync_logic():
|
| 13 |
"""Background task to sync prices."""
|
| 14 |
while True:
|
| 15 |
+
print(f"π [Background Sync] Starting update at {time.ctime()}...", flush=True)
|
| 16 |
try:
|
| 17 |
with open(HTML_FILE, 'r', encoding='utf-8') as f:
|
| 18 |
content = f.read()
|
|
|
|
| 48 |
|
| 49 |
with open(HTML_FILE, 'w', encoding='utf-8') as f:
|
| 50 |
f.write(updated_content)
|
| 51 |
+
print("β
[Background Sync] HTML File Updated.", flush=True)
|
| 52 |
except Exception as e:
|
| 53 |
+
print(f"β [Background Sync] Error: {e}", flush=True)
|
| 54 |
|
| 55 |
time.sleep(SYNC_INTERVAL)
|
| 56 |
|