lvkaokao commited on
Commit
715b290
1 Parent(s): f79e1cd

add global lock for git-push.

Browse files
Files changed (1) hide show
  1. src/submission/submit.py +1 -1
src/submission/submit.py CHANGED
@@ -230,12 +230,12 @@ def add_new_eval(
230
  try:
231
  print("git-push get lock..............")
232
  GLOBAL_COND.acquire()
 
233
  REPO.remotes.origin.pull(branch)
234
  REPO.remotes.origin.push(branch)
235
 
236
  REPO.index.remove("requests", False, r=True)
237
 
238
- branch = REPO.active_branch.name
239
  REPO.index.add([req_git_path, sta_git_path])
240
  commit = REPO.index.commit(f"Add {model} to eval requests/status.")
241
 
 
230
  try:
231
  print("git-push get lock..............")
232
  GLOBAL_COND.acquire()
233
+ branch = REPO.active_branch.name
234
  REPO.remotes.origin.pull(branch)
235
  REPO.remotes.origin.push(branch)
236
 
237
  REPO.index.remove("requests", False, r=True)
238
 
 
239
  REPO.index.add([req_git_path, sta_git_path])
240
  commit = REPO.index.commit(f"Add {model} to eval requests/status.")
241