diff --git a/features/update/worker_restart/feature.php b/features/update/worker_restart/feature.php index d6314358..bd59cabc 100644 --- a/features/update/worker_restart/feature.php +++ b/features/update/worker_restart/feature.php @@ -13,7 +13,6 @@ use Temporal\Activity\ActivityMethod; use Temporal\Activity\ActivityOptions; use Temporal\Client\WorkflowStubInterface; -use Temporal\Exception\Failure\ApplicationFailure; use Temporal\Workflow; use Temporal\Workflow\WorkflowInterface; use Temporal\Workflow\WorkflowMethod; @@ -58,9 +57,8 @@ public function blocks(): string $this->kv->set(KV_ACTIVITY_STARTED, true); do { - $blocked = $this->kv->get(KV_ACTIVITY_BLOCKED); + $blocked = $this->kv->get(KV_ACTIVITY_BLOCKED, true); - \is_bool($blocked) or throw new ApplicationFailure('KV BLOCKED key not set', 'KvNotSet', true); if (!$blocked) { break; } @@ -80,7 +78,6 @@ public static function check( ContainerInterface $c, Runner $runner, ): void { - $c->get(StorageInterface::class)->set(KV_ACTIVITY_BLOCKED, true); $handle = $stub->startUpdate('do_activities'); # Wait for the activity to start.