Beracles commited on
Commit
3033731
·
1 Parent(s): b4cd98c

logging only succeed once

Browse files
Files changed (1) hide show
  1. call_logger.py +2 -1
call_logger.py CHANGED
@@ -24,8 +24,9 @@ def call_logger(log_info, caller, hf_token) -> None:
24
  )
25
  client.submit(json.dumps(log_info), caller)
26
  print(f"[logging to {url}] OK")
 
27
  except Exception as e:
28
- print(f"[logging to {url}] error: {e}")
29
  #################################################
30
  calling_end = beijing()
31
  timecost = calling_end.timestamp() - calling_start.timestamp()
 
24
  )
25
  client.submit(json.dumps(log_info), caller)
26
  print(f"[logging to {url}] OK")
27
+ return None
28
  except Exception as e:
29
+ print(f"[logging to {url}] Failed, {type(e)}: {e}")
30
  #################################################
31
  calling_end = beijing()
32
  timecost = calling_end.timestamp() - calling_start.timestamp()