Skip to content

Commit

Permalink
runtime-v2: remove constructor argument
Browse files Browse the repository at this point in the history
  • Loading branch information
ibodrov committed May 6, 2024
1 parent 57118f3 commit 8c604ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,6 @@ public void reentrantSuspend(String eventName, Map<String, Serializable> taskSta
}

state.peekFrame(currentThreadId)
.push(new TaskSuspendCommand(correlationId, LogUtils.getContext(), eventName, (TaskCall) step, taskState));
.push(new TaskSuspendCommand(correlationId, eventName, (TaskCall) step, taskState));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.walmartlabs.concord.runtime.v2.model.TaskCall;
import com.walmartlabs.concord.runtime.v2.runner.context.ResumeEventImpl;
import com.walmartlabs.concord.runtime.v2.runner.logging.LogContext;
import com.walmartlabs.concord.runtime.v2.runner.logging.LogUtils;
import com.walmartlabs.concord.svm.Runtime;
import com.walmartlabs.concord.svm.*;

Expand All @@ -35,14 +36,12 @@ public class TaskSuspendCommand implements Command {
private static final long serialVersionUID = 1L;

private final UUID correlationId;
private final LogContext logContext;
private final String eventName;
private final TaskCall step;
private final Map<String, Serializable> taskState;

public TaskSuspendCommand(UUID correlationId, LogContext logContext, String eventName, TaskCall step, Map<String, Serializable> taskState) {
public TaskSuspendCommand(UUID correlationId, String eventName, TaskCall step, Map<String, Serializable> taskState) {
this.correlationId = correlationId;
this.logContext = logContext;
this.eventName = eventName;
this.step = step;
this.taskState = taskState;
Expand All @@ -53,6 +52,7 @@ public void eval(Runtime runtime, State state, ThreadId threadId) {
Frame frame = state.peekFrame(threadId);
frame.pop();

LogContext logContext = LogUtils.getContext();
frame.push(new TaskResumeCommand(correlationId, logContext, step, new ResumeEventImpl(eventName, taskState)));
frame.push(new SuspendCommand(eventName));
}
Expand Down

0 comments on commit 8c604ed

Please sign in to comment.