chfeng commited on
Commit
19b956e
Β·
verified Β·
1 Parent(s): d28f49a

Make repo sync blocking to prevent data loss

Browse files
Files changed (1) hide show
  1. annotate_tips.py +1 -1
annotate_tips.py CHANGED
@@ -104,7 +104,7 @@ def save_annotation_file(annotator, data):
104
  path = os.path.join(ANNOTATION_DIR, f'{annotator}.json')
105
  with open(path, 'w') as f:
106
  json.dump(data, f, indent=2)
107
- threading.Thread(target=_sync_to_repo, args=(annotator,), daemon=True).start()
108
 
109
 
110
  # ─── Routes ───
 
104
  path = os.path.join(ANNOTATION_DIR, f'{annotator}.json')
105
  with open(path, 'w') as f:
106
  json.dump(data, f, indent=2)
107
+ _sync_to_repo(annotator) # blocking sync to HF repo so no data is lost
108
 
109
 
110
  # ─── Routes ───