Spaces:
Runtime error
Runtime error
cspocketindia
commited on
Commit
•
f4cc736
1
Parent(s):
38fa95a
do every minute
Browse files- gradio_app.py +4 -1
gradio_app.py
CHANGED
@@ -36,6 +36,8 @@ def log_record(vals):
|
|
36 |
if is_new:
|
37 |
writer.writerow(utils.sanitize_list_for_csv(headers))
|
38 |
writer.writerow(utils.sanitize_list_for_csv(vals))
|
|
|
|
|
39 |
|
40 |
# with open(log_file, "r", encoding="utf-8") as csvfile:
|
41 |
# line_count = len([None for _ in csv.reader(csvfile)]) - 1
|
@@ -71,4 +73,5 @@ def sync_logs():
|
|
71 |
# repo.git_push()
|
72 |
repo.push_to_hub()
|
73 |
|
74 |
-
schedule.every(
|
|
|
|
36 |
if is_new:
|
37 |
writer.writerow(utils.sanitize_list_for_csv(headers))
|
38 |
writer.writerow(utils.sanitize_list_for_csv(vals))
|
39 |
+
|
40 |
+
print(f"Last Sync: {job.last_run}")
|
41 |
|
42 |
# with open(log_file, "r", encoding="utf-8") as csvfile:
|
43 |
# line_count = len([None for _ in csv.reader(csvfile)]) - 1
|
|
|
73 |
# repo.git_push()
|
74 |
repo.push_to_hub()
|
75 |
|
76 |
+
job = schedule.every().minute.do(sync_logs)
|
77 |
+
print("Scheduler engaged")
|