feat: 完成七段数码管后端

This commit is contained in:
2025-08-14 15:21:15 +08:00
parent 0e07a5996a
commit 7bfc362b1f
13 changed files with 189 additions and 58 deletions

View File

@@ -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));
}
}