feat: support multipe project
This commit is contained in:
@@ -5,6 +5,7 @@ import time
|
||||
import traceback
|
||||
|
||||
EXP_URL = "http://10.2.1.195:880"
|
||||
PROJECT_NAME = "challenge_knn"
|
||||
|
||||
|
||||
def load_user_function(file_path, function_name):
|
||||
@@ -93,11 +94,12 @@ def upload_score(name, id, score_data):
|
||||
"%Y-%m-%d %H:%M:%S", time.gmtime(time.time() + 8 * 3600)
|
||||
),
|
||||
"details": score_data["details"],
|
||||
"project": PROJECT_NAME,
|
||||
},
|
||||
)
|
||||
if response.status_code == 200:
|
||||
print("上传成绩成功!")
|
||||
elif response.status_code == 400:
|
||||
print(f"{response.json()["message"]}")
|
||||
else:
|
||||
print("上传成绩失败!\n原因:", response.json()["message"])
|
||||
except Exception as e:
|
||||
print(f"上传成绩出错: {e}")
|
||||
|
||||
Reference in New Issue
Block a user