| | 1 | | using LGDXRobotCloud.API.Services.Common; |
| | 2 | | using LGDXRobotCloud.API.Services.Navigation; |
| | 3 | | using LGDXRobotCloud.Data.Contracts; |
| | 4 | | using LGDXRobotCloud.Data.DbContexts; |
| | 5 | | using LGDXRobotCloud.Data.Entities; |
| | 6 | | using LGDXRobotCloud.Protos; |
| | 7 | | using LGDXRobotCloud.Utilities.Enums; |
| | 8 | | using LGDXRobotCloud.Utilities.Helpers; |
| | 9 | | using MassTransit; |
| | 10 | | using Microsoft.EntityFrameworkCore; |
| | 11 | | using Microsoft.Extensions.Caching.Distributed; |
| | 12 | | using Microsoft.Extensions.Caching.Memory; |
| | 13 | |
|
| | 14 | | namespace LGDXRobotCloud.API.Services.Automation; |
| | 15 | |
|
| | 16 | | public interface IAutoTaskSchedulerService |
| | 17 | | { |
| | 18 | | void ResetIgnoreRobot(int realmId); |
| | 19 | | Task<RobotClientsAutoTask?> GetAutoTaskAsync(Guid robotId); |
| | 20 | | Task<RobotClientsAutoTask?> AutoTaskAbortAsync(Guid robotId, int taskId, string token, AutoTaskAbortReason autoTaskAbo |
| | 21 | | Task<bool> AutoTaskAbortApiAsync(int taskId); |
| | 22 | | Task<RobotClientsAutoTask?> AutoTaskNextAsync(Guid robotId, int taskId, string token); |
| | 23 | | Task<AutoTask?> AutoTaskNextApiAsync(Guid robotId, int taskId, string token); |
| | 24 | | Task<RobotClientsAutoTask?> AutoTaskNextConstructAsync(AutoTask autoTask); |
| | 25 | | } |
| | 26 | |
|
| 0 | 27 | | public class AutoTaskSchedulerService( |
| 0 | 28 | | IBus bus, |
| 0 | 29 | | IEmailService emailService, |
| 0 | 30 | | IMemoryCache memoryCache, |
| 0 | 31 | | IOnlineRobotsService onlineRobotsService, |
| 0 | 32 | | IRobotService robotService, |
| 0 | 33 | | ITriggerService triggerService, |
| 0 | 34 | | LgdxContext context |
| 0 | 35 | | ) : IAutoTaskSchedulerService |
| | 36 | | { |
| 0 | 37 | | private readonly IBus _bus = bus ?? throw new ArgumentNullException(nameof(bus)); |
| 0 | 38 | | private readonly IEmailService _emailService = emailService ?? throw new ArgumentNullException(nameof(emailService)); |
| 0 | 39 | | private readonly IMemoryCache _memoryCache = memoryCache ?? throw new ArgumentNullException(nameof(memoryCache)); |
| 0 | 40 | | private readonly IOnlineRobotsService _onlineRobotsService = onlineRobotsService ?? throw new ArgumentNullException(na |
| 0 | 41 | | private readonly IRobotService _robotService = robotService ?? throw new ArgumentNullException(nameof(robotService)); |
| 0 | 42 | | private readonly ITriggerService _triggerService = triggerService ?? throw new ArgumentNullException(nameof(triggerSer |
| 0 | 43 | | private readonly LgdxContext _context = context ?? throw new ArgumentNullException(nameof(context)); |
| 0 | 44 | | private static string GetIgnoreRobotsKey(int realmId) => $"AutoTaskSchedulerService_IgnoreRobot_{realmId}"; |
| | 45 | |
|
| | 46 | | private static RobotClientsDof GenerateWaypoint(AutoTaskDetail taskDetail) |
| 0 | 47 | | { |
| 0 | 48 | | if (taskDetail.Waypoint != null) |
| 0 | 49 | | { |
| 0 | 50 | | var waypoint = new RobotClientsDof |
| 0 | 51 | | { X = taskDetail.Waypoint.X, Y = taskDetail.Waypoint.Y, Rotation = taskDetail.Waypoint.Rotation }; |
| 0 | 52 | | if (taskDetail.CustomX != null) |
| 0 | 53 | | waypoint.X = (double)taskDetail.CustomX; |
| 0 | 54 | | if (taskDetail.CustomY != null) |
| 0 | 55 | | waypoint.X = (double)taskDetail.CustomY; |
| 0 | 56 | | if (taskDetail.CustomRotation != null) |
| 0 | 57 | | waypoint.X = (double)taskDetail.CustomRotation; |
| 0 | 58 | | return waypoint; |
| | 59 | | } |
| | 60 | | else |
| 0 | 61 | | { |
| 0 | 62 | | return new RobotClientsDof { |
| 0 | 63 | | X = taskDetail.CustomX != null ? (double)taskDetail.CustomX : 0, |
| 0 | 64 | | Y = taskDetail.CustomY != null ? (double)taskDetail.CustomY : 0, |
| 0 | 65 | | Rotation = taskDetail.CustomRotation != null ? (double)taskDetail.CustomRotation : 0 }; |
| | 66 | | } |
| 0 | 67 | | } |
| | 68 | |
|
| | 69 | | private async Task<RobotClientsAutoTask?> GenerateTaskDetail(AutoTask? task, bool continueAutoTask = false) |
| 0 | 70 | | { |
| 0 | 71 | | if (task == null) |
| 0 | 72 | | { |
| 0 | 73 | | return null; |
| | 74 | | } |
| | 75 | |
|
| 0 | 76 | | var progress = await _context.Progresses.AsNoTracking() |
| 0 | 77 | | .Where(p => p.Id == task.CurrentProgressId) |
| 0 | 78 | | .Select(p => new { p.Name }) |
| 0 | 79 | | .FirstOrDefaultAsync(); |
| 0 | 80 | | if (!continueAutoTask) |
| 0 | 81 | | { |
| | 82 | | // Notify the updated task |
| 0 | 83 | | var flowName = await _context.Flows.AsNoTracking() |
| 0 | 84 | | .Where(f => f.Id == task.FlowId) |
| 0 | 85 | | .Select(f => f.Name) |
| 0 | 86 | | .FirstOrDefaultAsync(); |
| 0 | 87 | | string? robotName = null; |
| 0 | 88 | | if (task.AssignedRobotId != null) |
| 0 | 89 | | { |
| 0 | 90 | | robotName = await _context.Robots.AsNoTracking() |
| 0 | 91 | | .Where(r => r.Id == task.AssignedRobotId) |
| 0 | 92 | | .Select(r => r.Name) |
| 0 | 93 | | .FirstOrDefaultAsync(); |
| 0 | 94 | | } |
| 0 | 95 | | await _bus.Publish(new AutoTaskUpdateContract{ |
| 0 | 96 | | Id = task.Id, |
| 0 | 97 | | Name = task.Name, |
| 0 | 98 | | Priority = task.Priority, |
| 0 | 99 | | FlowId = task.FlowId ?? 0, |
| 0 | 100 | | FlowName = flowName ?? "Deleted Flow", |
| 0 | 101 | | RealmId = task.RealmId, |
| 0 | 102 | | AssignedRobotId = task.AssignedRobotId, |
| 0 | 103 | | AssignedRobotName = robotName, |
| 0 | 104 | | CurrentProgressId = task.CurrentProgressId, |
| 0 | 105 | | CurrentProgressName = progress!.Name, |
| 0 | 106 | | }); |
| 0 | 107 | | } |
| | 108 | |
|
| 0 | 109 | | if (task.CurrentProgressId == (int)ProgressState.Completed || task.CurrentProgressId == (int)ProgressState.Aborted) |
| 0 | 110 | | { |
| | 111 | | // Return immediately if the task is completed / aborted |
| 0 | 112 | | return new RobotClientsAutoTask { |
| 0 | 113 | | TaskId = task.Id, |
| 0 | 114 | | TaskName = task.Name ?? string.Empty, |
| 0 | 115 | | TaskProgressId = task.CurrentProgressId, |
| 0 | 116 | | TaskProgressName = progress!.Name ?? string.Empty, |
| 0 | 117 | | Waypoints = {}, |
| 0 | 118 | | NextToken = string.Empty, |
| 0 | 119 | | }; |
| | 120 | | } |
| | 121 | |
|
| 0 | 122 | | var flowDetail = await _context.FlowDetails.AsNoTracking() |
| 0 | 123 | | .Where(fd => fd.FlowId == task.FlowId && fd.Order == (int)task.CurrentProgressOrder!) |
| 0 | 124 | | .FirstOrDefaultAsync(); |
| 0 | 125 | | if (!continueAutoTask && flowDetail!.TriggerId != null) |
| 0 | 126 | | { |
| | 127 | | // Fire the trigger |
| 0 | 128 | | await _triggerService.InitialiseTriggerAsync(task, flowDetail); |
| 0 | 129 | | } |
| | 130 | |
|
| 0 | 131 | | List<RobotClientsDof> waypoints = []; |
| 0 | 132 | | if (task.CurrentProgressId == (int)ProgressState.PreMoving) |
| 0 | 133 | | { |
| 0 | 134 | | var firstTaskDetail = await _context.AutoTasksDetail.AsNoTracking() |
| 0 | 135 | | .Where(t => t.AutoTaskId == task.Id) |
| 0 | 136 | | .Include(t => t.Waypoint) |
| 0 | 137 | | .OrderBy(t => t.Order) |
| 0 | 138 | | .FirstOrDefaultAsync(); |
| 0 | 139 | | if (firstTaskDetail != null) |
| 0 | 140 | | waypoints.Add(GenerateWaypoint(firstTaskDetail)); |
| 0 | 141 | | } |
| 0 | 142 | | else if (task.CurrentProgressId == (int)ProgressState.Moving) |
| 0 | 143 | | { |
| 0 | 144 | | var taskDetails = await _context.AutoTasksDetail.AsNoTracking() |
| 0 | 145 | | .Where(t => t.AutoTaskId == task.Id) |
| 0 | 146 | | .Include(t => t.Waypoint) |
| 0 | 147 | | .OrderBy(t => t.Order) |
| 0 | 148 | | .ToListAsync(); |
| 0 | 149 | | foreach (var t in taskDetails) |
| 0 | 150 | | { |
| 0 | 151 | | if (t.Waypoint != null) |
| 0 | 152 | | waypoints.Add(GenerateWaypoint(t)); |
| 0 | 153 | | } |
| 0 | 154 | | } |
| | 155 | |
|
| 0 | 156 | | string nextToken = task.NextToken ?? string.Empty; |
| 0 | 157 | | if (flowDetail?.AutoTaskNextControllerId != (int) AutoTaskNextController.Robot) |
| 0 | 158 | | { |
| | 159 | | // API has the control |
| 0 | 160 | | nextToken = string.Empty; |
| 0 | 161 | | } |
| | 162 | |
|
| 0 | 163 | | return new RobotClientsAutoTask { |
| 0 | 164 | | TaskId = task.Id, |
| 0 | 165 | | TaskName = task.Name ?? string.Empty, |
| 0 | 166 | | TaskProgressId = task.CurrentProgressId, |
| 0 | 167 | | TaskProgressName = progress!.Name ?? string.Empty, |
| 0 | 168 | | Waypoints = { waypoints }, |
| 0 | 169 | | NextToken = nextToken, |
| 0 | 170 | | }; |
| 0 | 171 | | } |
| | 172 | |
|
| | 173 | | public void ResetIgnoreRobot(int realmId) |
| 0 | 174 | | { |
| 0 | 175 | | _memoryCache.Remove(GetIgnoreRobotsKey(realmId)); |
| 0 | 176 | | } |
| | 177 | |
|
| | 178 | | private async Task<AutoTask?> GetRunningAutoTaskSqlAsync(Guid robotId) |
| 0 | 179 | | { |
| 0 | 180 | | return await _context.AutoTasks.AsNoTracking() |
| 0 | 181 | | .Include(t => t.AutoTaskDetails) |
| 0 | 182 | | .Where(t => t.AssignedRobotId == robotId) |
| 0 | 183 | | .Where(t => !LgdxHelper.AutoTaskStaticStates.Contains(t.CurrentProgressId)) |
| 0 | 184 | | .OrderByDescending(t => t.Priority) // In case the robot has multiple running task by mistake |
| 0 | 185 | | .ThenByDescending(t => t.AssignedRobotId) |
| 0 | 186 | | .ThenBy(t => t.Id) |
| 0 | 187 | | .FirstOrDefaultAsync(); |
| 0 | 188 | | } |
| | 189 | |
|
| | 190 | | private async Task<AutoTask?> AssignAutoTaskSqlAsync(Guid robotId) |
| 0 | 191 | | { |
| 0 | 192 | | AutoTask? task = null; |
| 0 | 193 | | using var transaction = await _context.Database.BeginTransactionAsync(); |
| | 194 | | try |
| 0 | 195 | | { |
| | 196 | | // Get waiting task |
| 0 | 197 | | task = await _context.AutoTasks.FromSql( |
| 0 | 198 | | $@"SELECT * FROM ""Automation.AutoTasks"" AS T |
| 0 | 199 | | WHERE T.""CurrentProgressId"" = {(int)ProgressState.Waiting} AND (T.""AssignedRobotId"" = {robotId} OR T.""A |
| 0 | 200 | | ORDER BY T.""Priority"" DESC, T.""AssignedRobotId"" DESC, T.""Id"" |
| 0 | 201 | | LIMIT 1 FOR UPDATE SKIP LOCKED" |
| 0 | 202 | | ).FirstOrDefaultAsync(); |
| | 203 | |
|
| | 204 | | // Get flow detail |
| 0 | 205 | | var flowDetail = await _context.FlowDetails |
| 0 | 206 | | .Where(f => f.FlowId == task!.FlowId) |
| 0 | 207 | | .Select(f => new { |
| 0 | 208 | | f.ProgressId, |
| 0 | 209 | | f.Order |
| 0 | 210 | | }) |
| 0 | 211 | | .OrderBy(f => f.Order) |
| 0 | 212 | | .FirstOrDefaultAsync(); |
| | 213 | |
|
| | 214 | | // Update task |
| 0 | 215 | | task!.AssignedRobotId = robotId; |
| 0 | 216 | | task.CurrentProgressId = flowDetail!.ProgressId; |
| 0 | 217 | | task.CurrentProgressOrder = flowDetail.Order; |
| 0 | 218 | | task.NextToken = LgdxHelper.GenerateMd5Hash($"{robotId} {task.Id} {task.CurrentProgressId} {DateTime.UtcNow}"); |
| 0 | 219 | | await _context.SaveChangesAsync(); |
| 0 | 220 | | await transaction.CommitAsync(); |
| 0 | 221 | | return task; |
| | 222 | | } |
| 0 | 223 | | catch (Exception) |
| 0 | 224 | | { |
| 0 | 225 | | await transaction.RollbackAsync(); |
| 0 | 226 | | } |
| 0 | 227 | | return null; |
| 0 | 228 | | } |
| | 229 | |
|
| | 230 | | public async Task<RobotClientsAutoTask?> GetAutoTaskAsync(Guid robotId) |
| 0 | 231 | | { |
| 0 | 232 | | var realmId = await _robotService.GetRobotRealmIdAsync(robotId) ?? 0; |
| 0 | 233 | | var ignoreRobotIds = _memoryCache.Get<HashSet<Guid>>(GetIgnoreRobotsKey(realmId)); |
| 0 | 234 | | if (ignoreRobotIds != null && (ignoreRobotIds?.Contains(robotId) ?? false)) |
| 0 | 235 | | { |
| 0 | 236 | | return null; |
| | 237 | | } |
| | 238 | |
|
| 0 | 239 | | var currentTask = await GetRunningAutoTaskSqlAsync(robotId); |
| 0 | 240 | | bool continueAutoTask = currentTask != null; |
| 0 | 241 | | if (currentTask == null) |
| 0 | 242 | | { |
| 0 | 243 | | if (!_onlineRobotsService.GetPauseAutoTaskAssignment(robotId)) |
| 0 | 244 | | { |
| 0 | 245 | | var count = await _context.AutoTasks.AsNoTracking() |
| 0 | 246 | | .Where(t => t.AssignedRobotId == robotId) |
| 0 | 247 | | .Where(t => !LgdxHelper.AutoTaskStaticStates.Contains(t.CurrentProgressId)) |
| 0 | 248 | | .CountAsync(); |
| 0 | 249 | | if (count > 0) |
| 0 | 250 | | { |
| | 251 | | // If there is already a task running, no task will be assigned. |
| 0 | 252 | | return null; |
| | 253 | | } |
| 0 | 254 | | currentTask = await AssignAutoTaskSqlAsync(robotId); |
| 0 | 255 | | } |
| | 256 | | else |
| 0 | 257 | | { |
| | 258 | | // If pause auto task assignment is true, new task will not be assigned. |
| 0 | 259 | | return null; |
| | 260 | | } |
| 0 | 261 | | } |
| | 262 | |
|
| 0 | 263 | | if (currentTask == null) |
| 0 | 264 | | { |
| | 265 | | // No task for this robot, pause database access. |
| 0 | 266 | | ignoreRobotIds ??= []; |
| 0 | 267 | | ignoreRobotIds.Add(robotId); |
| 0 | 268 | | _memoryCache.Set(GetIgnoreRobotsKey(realmId), ignoreRobotIds, TimeSpan.FromMinutes(5)); |
| 0 | 269 | | } |
| 0 | 270 | | return await GenerateTaskDetail(currentTask, continueAutoTask); |
| 0 | 271 | | } |
| | 272 | |
|
| | 273 | | private async Task<AutoTask?> AutoTaskAbortSqlAsync(int taskId, Guid? robotId = null, string? token = null) |
| 0 | 274 | | { |
| 0 | 275 | | AutoTask? task = null; |
| 0 | 276 | | using var transaction = await _context.Database.BeginTransactionAsync(); |
| | 277 | | try |
| 0 | 278 | | { |
| | 279 | | // Get task |
| 0 | 280 | | if (robotId == null && string.IsNullOrWhiteSpace(token)) |
| 0 | 281 | | { |
| | 282 | | // From API |
| 0 | 283 | | task = await _context.AutoTasks.FromSql( |
| 0 | 284 | | $@"SELECT * FROM ""Automation.AutoTasks"" AS T |
| 0 | 285 | | WHERE T.""Id"" = {taskId} |
| 0 | 286 | | LIMIT 1 FOR UPDATE NOWAIT" |
| 0 | 287 | | ).FirstOrDefaultAsync(); |
| 0 | 288 | | } |
| | 289 | | else |
| 0 | 290 | | { |
| 0 | 291 | | task = await _context.AutoTasks.FromSql( |
| 0 | 292 | | $@"SELECT * FROM ""Automation.AutoTasks"" AS T |
| 0 | 293 | | WHERE T.""Id"" = {taskId} AND T.""AssignedRobotId"" = {robotId} AND T.""NextToken"" = {token} |
| 0 | 294 | | LIMIT 1 FOR UPDATE NOWAIT" |
| 0 | 295 | | ).FirstOrDefaultAsync(); |
| 0 | 296 | | } |
| | 297 | |
|
| | 298 | | // Update task |
| 0 | 299 | | task!.CurrentProgressId = (int)ProgressState.Aborted; |
| 0 | 300 | | task.CurrentProgressOrder = null; |
| 0 | 301 | | task.NextToken = null; |
| 0 | 302 | | await _context.SaveChangesAsync(); |
| 0 | 303 | | await transaction.CommitAsync(); |
| 0 | 304 | | } |
| 0 | 305 | | catch (Exception) |
| 0 | 306 | | { |
| 0 | 307 | | await transaction.RollbackAsync(); |
| 0 | 308 | | } |
| 0 | 309 | | return task; |
| 0 | 310 | | } |
| | 311 | |
|
| | 312 | | private async Task DeleteTriggerRetries(int taskId) |
| 0 | 313 | | { |
| 0 | 314 | | var count = await _context.TriggerRetries.Where(tr => tr.AutoTaskId == taskId).CountAsync(); |
| 0 | 315 | | if (count > 0) |
| 0 | 316 | | { |
| 0 | 317 | | await _context.TriggerRetries.Where(tr => tr.AutoTaskId == taskId).ExecuteDeleteAsync(); |
| 0 | 318 | | } |
| 0 | 319 | | } |
| | 320 | |
|
| | 321 | | public async Task<RobotClientsAutoTask?> AutoTaskAbortAsync(Guid robotId, int taskId, string token, AutoTaskAbortReaso |
| 0 | 322 | | { |
| 0 | 323 | | var task = await AutoTaskAbortSqlAsync(taskId, robotId, token); |
| 0 | 324 | | await DeleteTriggerRetries(taskId); |
| 0 | 325 | | await _emailService.SendAutoTaskAbortEmailAsync(robotId, taskId, autoTaskAbortReason); |
| 0 | 326 | | return await GenerateTaskDetail(task); |
| 0 | 327 | | } |
| | 328 | |
|
| | 329 | | public async Task<bool> AutoTaskAbortApiAsync(int taskId) |
| 0 | 330 | | { |
| 0 | 331 | | var task = await AutoTaskAbortSqlAsync(taskId); |
| 0 | 332 | | if (task == null) |
| 0 | 333 | | return false; |
| | 334 | |
|
| 0 | 335 | | await DeleteTriggerRetries(taskId); |
| 0 | 336 | | await _emailService.SendAutoTaskAbortEmailAsync((Guid)task!.AssignedRobotId!, taskId, AutoTaskAbortReason.UserApi); |
| 0 | 337 | | return true; |
| 0 | 338 | | } |
| | 339 | |
|
| | 340 | | private async Task<AutoTask?> AutoTaskNextSqlAsync(Guid robotId, int taskId, string token) |
| 0 | 341 | | { |
| 0 | 342 | | AutoTask? task = null; |
| 0 | 343 | | using var transaction = await _context.Database.BeginTransactionAsync(); |
| | 344 | | try |
| 0 | 345 | | { |
| | 346 | | // Get waiting task |
| 0 | 347 | | task = await _context.AutoTasks.FromSql( |
| 0 | 348 | | $@"SELECT * FROM ""Automation.AutoTasks"" AS T |
| 0 | 349 | | WHERE T.""Id"" = {taskId} AND T.""AssignedRobotId"" = {robotId} AND T.""NextToken"" = {token} |
| 0 | 350 | | LIMIT 1 FOR UPDATE NOWAIT" |
| 0 | 351 | | ).FirstOrDefaultAsync(); |
| | 352 | |
|
| | 353 | | // Get flow detail |
| 0 | 354 | | var flowDetail = await _context.FlowDetails.AsNoTracking() |
| 0 | 355 | | .Where(f => f.FlowId == task!.FlowId) |
| 0 | 356 | | .Where(f => f.Order > task!.CurrentProgressOrder) |
| 0 | 357 | | .Select(f => new { |
| 0 | 358 | | f.ProgressId, |
| 0 | 359 | | f.Order |
| 0 | 360 | | }) |
| 0 | 361 | | .OrderBy(f => f.Order) |
| 0 | 362 | | .FirstOrDefaultAsync(); |
| | 363 | |
|
| | 364 | | // Update task |
| 0 | 365 | | if (flowDetail != null) |
| 0 | 366 | | { |
| 0 | 367 | | task!.CurrentProgressId = flowDetail!.ProgressId; |
| 0 | 368 | | task.CurrentProgressOrder = flowDetail.Order; |
| 0 | 369 | | task.NextToken = LgdxHelper.GenerateMd5Hash($"{robotId} {task.Id} {task.CurrentProgressId} {DateTime.UtcNow}"); |
| 0 | 370 | | } |
| | 371 | | else |
| 0 | 372 | | { |
| 0 | 373 | | task!.CurrentProgressId = (int)ProgressState.Completed; |
| 0 | 374 | | task.CurrentProgressOrder = null; |
| 0 | 375 | | task.NextToken = null; |
| 0 | 376 | | } |
| | 377 | |
|
| 0 | 378 | | await _context.SaveChangesAsync(); |
| 0 | 379 | | await transaction.CommitAsync(); |
| 0 | 380 | | } |
| 0 | 381 | | catch (Exception) |
| 0 | 382 | | { |
| 0 | 383 | | await transaction.RollbackAsync(); |
| 0 | 384 | | } |
| 0 | 385 | | return task; |
| 0 | 386 | | } |
| | 387 | |
|
| | 388 | | public async Task<RobotClientsAutoTask?> AutoTaskNextAsync(Guid robotId, int taskId, string token) |
| 0 | 389 | | { |
| 0 | 390 | | var task = await AutoTaskNextSqlAsync(robotId, taskId, token); |
| 0 | 391 | | return await GenerateTaskDetail(task); |
| 0 | 392 | | } |
| | 393 | |
|
| | 394 | | public async Task<AutoTask?> AutoTaskNextApiAsync(Guid robotId, int taskId, string token) |
| 0 | 395 | | { |
| 0 | 396 | | return await AutoTaskNextSqlAsync(robotId, taskId, token); |
| 0 | 397 | | } |
| | 398 | |
|
| | 399 | | public async Task<RobotClientsAutoTask?> AutoTaskNextConstructAsync(AutoTask autoTask) |
| 0 | 400 | | { |
| 0 | 401 | | return await GenerateTaskDetail(autoTask); |
| 0 | 402 | | } |
| | 403 | | } |