From 744c2b0c86b88f77e681f8660bf3a476e83711b8 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Wed, 27 Jan 2021 13:56:28 +0300 Subject: Move temporal plugin to the temporal repository --- tests/temporal/Activity/HeartBeatActivity.php | 58 --------------------------- 1 file changed, 58 deletions(-) delete mode 100644 tests/temporal/Activity/HeartBeatActivity.php (limited to 'tests/temporal/Activity/HeartBeatActivity.php') diff --git a/tests/temporal/Activity/HeartBeatActivity.php b/tests/temporal/Activity/HeartBeatActivity.php deleted file mode 100644 index acf4a451..00000000 --- a/tests/temporal/Activity/HeartBeatActivity.php +++ /dev/null @@ -1,58 +0,0 @@ - $value]); - sleep($value); - return 'OK'; - } - - #[ActivityMethod] - public function slow( - string $value - ): string { - for ($i = 0; $i < 5; $i++) { - Activity::heartbeat(['value' => $i]); - sleep(1); - } - - return 'OK'; - } - - #[ActivityMethod] - public function something( - string $value - ): string { - Activity::heartbeat(['value' => $value]); - sleep($value); - return 'OK'; - } - - #[ActivityMethod] - public function failedActivity( - int $value - ): string { - Activity::heartbeat(['value' => $value]); - if (Activity::getInfo()->attempt === 1) { - throw new \Error("failed"); - } - - if (!is_array(Activity::getHeartbeatDetails())) { - throw new \Error("no heartbeat details"); - } - - return 'OK!'; - } -} \ No newline at end of file -- cgit v1.2.3