wsj1995 commited on
Commit
bad2194
·
1 Parent(s): 559b948

feat: 增加日志

Browse files
Files changed (1) hide show
  1. api.py +2 -0
api.py CHANGED
@@ -77,6 +77,7 @@ async def upload_file(userId: str, modelId: str, filename: str, file: UploadFile
77
  )
78
  callback(modelId,'UPLOADED')
79
  except Exception as e:
 
80
  callback(modelId,'FAIL')
81
  os.remove(file_location)
82
  return {'success': True, 'id': modelId}
@@ -105,4 +106,5 @@ def callback(modelId,status):
105
  'status': status,
106
  'model_id': modelId
107
  })
 
108
  print(f"回调结果 {res.status_code}")
 
77
  )
78
  callback(modelId,'UPLOADED')
79
  except Exception as e:
80
+ print(e)
81
  callback(modelId,'FAIL')
82
  os.remove(file_location)
83
  return {'success': True, 'id': modelId}
 
106
  'status': status,
107
  'model_id': modelId
108
  })
109
+ print(f"{os.environ.get('CALLBACK_DOMAIN')}{url}?auth_key={timestamp}-{rand}-{uid}-{md5}")
110
  print(f"回调结果 {res.status_code}")