You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deleting a job fails if an incomplete (non success/failure) job execution exists for the job.
336
336
337
337
## FAQ
338
-
####What happens if I call `StartNextPendingJobExecution` and there are no jobs to execute?
338
+
### What happens if I call `StartNextPendingJobExecution` and there are no jobs to execute?
339
339
The request will not fail, but the `execution` field of the response will be empty, indicating that there is nothing to do.
340
340
341
-
####What happens if I call `StartNextPendingJobExecution` twice in a row (or while another job is in the IN_PROGRESS state)?
341
+
### What happens if I call `StartNextPendingJobExecution` twice in a row (or while another job is in the IN_PROGRESS state)?
342
342
The service will return the execution information for the IN_PROGRESS job again.
343
343
344
-
####What if I want my device to handle multiple job executions at once?
344
+
### What if I want my device to handle multiple job executions at once?
345
345
Since `startNextPendingJobExecution` does not help here, the device application can manually update a job execution from the QUEUED state to the IN_PROGRESS
346
346
state in the same manner that it completes a job execution: use `getPendingJobExecutions` to get the list of queued executions and use
347
347
`updateJobExecution` to move one or more job executions into the IN_PROGRESS state.
348
348
349
-
####What is the proper generic architecture for a job-processing application running on a device?
349
+
### What is the proper generic architecture for a job-processing application running on a device?
350
350
A device's persistent job executor should:
351
351
1. On startup, create and open streaming operations for both the JobExecutionsChanged and NextJobExecutionChanged events
352
352
2. On startup, get and cache the set of incomplete job executions using `GetPendingJobExecutions`
353
353
3. Keep the cached job execution set up to date by reacting appropriately to JobExecutionsChanged and NextJobExecutionChanged events
354
354
4. While there are incomplete job executions, start and execute them one-at-a-time; otherwise wait for a new entry in the incomplete (queued) job executions set.
355
+
355
356
## ⚠️ Usage disclaimer
356
357
357
358
These code examples interact with services that may incur charges to your AWS account. For more information, see [AWS Pricing](https://aws.amazon.com/pricing/).
0 commit comments