Creates a canvas that waits "n * sum(1..n) * 10" in seconds, with n = 3. The canvas itself is stamped with a unique monitoring id stamp per task. The waiting task is stamped with different consistent stamp, which is used to revoke the task by its stamped header.
()
| 30 | |
| 31 | |
| 32 | def prepare_workflow() -> Signature: |
| 33 | """Creates a canvas that waits "n * sum(1..n) * 10" in seconds, |
| 34 | with n = 3. |
| 35 | |
| 36 | The canvas itself is stamped with a unique monitoring id stamp per task. |
| 37 | The waiting task is stamped with different consistent stamp, which is used |
| 38 | to revoke the task by its stamped header. |
| 39 | """ |
| 40 | canvas = create_canvas(n=3) |
| 41 | canvas = canvas | wait_for_revoke.s() |
| 42 | canvas.stamp(MonitoringIdStampingVisitor()) |
| 43 | return canvas |
| 44 | |
| 45 | |
| 46 | def run_then_revoke(): |
no test coverage detected