Skip to content

Commit

Permalink
robot: add order tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
darakeon committed Sep 21, 2024
1 parent fa5f106 commit 500275f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion robot/Robot/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"profiles": {
"Robot": {
"commandName": "Project",
"commandLineArgs": "5",
"commandLineArgs": "7",
"environmentVariables": {
"ASPNET_CORE_ENVIRONMENT": "Development"
}
Expand Down
10 changes: 10 additions & 0 deletions robot/Robot/Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public Service(RobotTask task)
switch (this.task)
{
case RobotTask.Wipe:
case RobotTask.Export:
case RobotTask.Expire:
wipeS3 = new S3Service(StoragePurpose.Wipe);
exportS3 = new S3Service(StoragePurpose.Export);
break;
Expand Down Expand Up @@ -92,6 +94,14 @@ public async Task Execute()
case RobotTask.Requeue:
await service.Executor.RequeueLines();
break;

case RobotTask.Export:
service.Executor.ExportOrder();
break;

case RobotTask.Expire:
service.Executor.DeleteExpiredOrders();
break;
}
}

Expand Down
2 changes: 2 additions & 0 deletions robot/Robot/Task.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ enum RobotTask
Import = 3,
Finish = 4,
Requeue = 5,
Export = 6,
Expire = 7,
}
}

0 comments on commit 500275f

Please sign in to comment.