diff options
author | Valery Piashchynski <[email protected]> | 2021-01-27 14:34:31 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-27 14:34:31 +0300 |
commit | 6dd131497808f414ac1cb952d4b0b89b9e0689f8 (patch) | |
tree | f7af7d7d494d1f5ca272af1ad0b978fe44d685a9 /tests/temporal/Workflow/CancelledWorkflow.php | |
parent | e2266b80db47444ba5858c736833a8a81b1361ad (diff) | |
parent | 744c2b0c86b88f77e681f8660bf3a476e83711b8 (diff) |
Merge pull request #507 from spiral/refactor/temporal-plugins
refactoring(temporal): Move temporal plugin to the https://github.com/temporalio/roadrunner-temporal repository
Diffstat (limited to 'tests/temporal/Workflow/CancelledWorkflow.php')
-rw-r--r-- | tests/temporal/Workflow/CancelledWorkflow.php | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/tests/temporal/Workflow/CancelledWorkflow.php b/tests/temporal/Workflow/CancelledWorkflow.php deleted file mode 100644 index be9f7542..00000000 --- a/tests/temporal/Workflow/CancelledWorkflow.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -namespace Temporal\Tests\Workflow; - -use Temporal\Activity\ActivityOptions; -use Temporal\Exception\Failure\CanceledFailure; -use Temporal\Tests\Activity\SimpleActivity; -use Temporal\Workflow; -use Temporal\Workflow\WorkflowMethod; - -#[Workflow\WorkflowInterface] -class CancelledWorkflow -{ - #[WorkflowMethod(name: 'CancelledWorkflow')] - public function handler() - { - $simple = Workflow::newActivityStub( - SimpleActivity::class, - ActivityOptions::new()->withStartToCloseTimeout(5) - ); - - // waits for 2 seconds - $slow = $simple->slow('DOING SLOW ACTIVITY'); - - try { - return yield $slow; - } catch (CanceledFailure $e) { - return "CANCELLED"; - } - } -} |