feat: 完成七段数码管后端
This commit is contained in:
@@ -33,10 +33,10 @@ public enum ProgressStatus
|
||||
[TranspilationSource]
|
||||
public class ProgressInfo
|
||||
{
|
||||
public string TaskId { get; }
|
||||
public ProgressStatus Status { get; }
|
||||
public int ProgressPercent { get; }
|
||||
public string ErrorMessage { get; }
|
||||
public virtual string TaskId { get; } = string.Empty;
|
||||
public virtual ProgressStatus Status { get; }
|
||||
public virtual int ProgressPercent { get; } = 0;
|
||||
public virtual string ErrorMessage { get; } = string.Empty;
|
||||
};
|
||||
|
||||
[Authorize]
|
||||
@@ -56,6 +56,6 @@ public class ProgressHub : Hub<IProgressReceiver>, IProgressHub
|
||||
|
||||
public async Task<bool> Join(string taskId)
|
||||
{
|
||||
return _tracker.BindTask(taskId, Context.ConnectionId);
|
||||
return await Task.Run(() => _tracker.BindTask(taskId, Context.ConnectionId));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user