-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test to prove RunTask doesn't delete tasks or retry as expected
Per documentation for RunTask https://cloud.google.com/tasks/docs/reference/rpc/google.cloud.tasks.v2#google.cloud.tasks.v2.CloudTasks.RunTask > If Cloud Tasks receives a successful response from the task's > target, then the task will be deleted; otherwise the task's > schedule_time will be reset to the time that RunTask was called > plus the retry delay specified in the queue's RetryConfig. In other words, it essentially internally works the same as if you'd set `ScheduleTime` to `now` (albeit that it also bypasses rate limits / queue pause state / etc). However the emulator is treating RunTask as a separate execution - the task will still run at the original scheduled time, albeit it immediately disappears from ListTasks / GetTasks. And additionally, the emulator is not retrying if a task triggered by RunTasks fails.
- Loading branch information
Showing
1 changed file
with
120 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters