Skip to content

Commit 7393ea5

Browse files
Remove redundant context resets
1 parent b36bd34 commit 7393ea5

2 files changed

Lines changed: 0 additions & 6 deletions

File tree

src/ActivityStub.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ public static function make($activity, ...$arguments): PromiseInterface
6464
}
6565

6666
++$context->index;
67-
WorkflowStub::setContext($context);
6867
$result = Serializer::unserialize($log->result);
6968
if (
7069
is_array($result) &&
@@ -88,14 +87,12 @@ public static function make($activity, ...$arguments): PromiseInterface
8887

8988
if (WorkflowStub::isProbing()) {
9089
++$context->index;
91-
WorkflowStub::setContext($context);
9290
return (new Deferred())->promise();
9391
}
9492

9593
$activity::dispatch($context->index, $context->now, $context->storedWorkflow, ...$arguments);
9694

9795
++$context->index;
98-
WorkflowStub::setContext($context);
9996
return (new Deferred())->promise();
10097
}
10198
}

src/ChildWorkflowStub.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public static function make($workflow, ...$arguments): PromiseInterface
5858
}
5959

6060
++$context->index;
61-
WorkflowStub::setContext($context);
6261
$result = Serializer::unserialize($log->result);
6362
if (
6463
is_array($result)
@@ -81,7 +80,6 @@ public static function make($workflow, ...$arguments): PromiseInterface
8180

8281
if (WorkflowStub::isProbing()) {
8382
++$context->index;
84-
WorkflowStub::setContext($context);
8583
return (new Deferred())->promise();
8684
}
8785

@@ -111,7 +109,6 @@ public static function make($workflow, ...$arguments): PromiseInterface
111109
}
112110

113111
++$context->index;
114-
WorkflowStub::setContext($context);
115112
return (new Deferred())->promise();
116113
}
117114
}

0 commit comments

Comments
 (0)