提交状态设计 #2
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
目前用户提交代码后,没有任何手段查询当前执行情况。需要在提交后返回一个
ID
,可用于查询题目当前判题状态现有的设计:提交后将任务发送给
Runner
,Runner
在完成所有工作后返回给Server
,此时向数据库插入最终结果。整个流程缺乏对“已提交”/“正在判题”的感知可能的解决方法:
Sol 1:
asynq
队列不自动销毁任务asynq
任务ID
Server
根据ID
确定是否正在判题,若判题完成则插叙status
redis
重启后,ID
丢失如何处理?Sol 2:
status
状态,标记为pending
status.ID
status.ID
跟着任务一起发送到队列status
现有设计难以实现,暂不处理