Skip to content

Commit 6510449

Browse files
committed
Revert "Temporary debugging"
This reverts commit c116441.
1 parent cd1f1a4 commit 6510449

2 files changed

Lines changed: 1 addition & 38 deletions

File tree

src/integration-tests/utils/waitForWorkflowStatus.ts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { WorkflowExecutor } from "../../sdk";
44
/**
55
* Wait for workflow to reach expected status
66
*/
7-
const LOG_INTERVAL_MS = 15000;
8-
97
export const waitForWorkflowStatus = async (
108
workflowClient: WorkflowExecutor,
119
workflowId: string,
@@ -14,21 +12,13 @@ export const waitForWorkflowStatus = async (
1412
pollIntervalMs = 3000
1513
): Promise<Workflow> => {
1614
const startTime = Date.now();
17-
let lastLogTime = 0;
18-
let lastStatus: string | undefined;
1915

2016
let lastError: unknown;
2117
while (Date.now() - startTime < maxWaitTimeMs) {
2218
try {
2319
const workflow = await workflowClient.getWorkflow(workflowId, true);
24-
const elapsed = Date.now() - startTime;
2520

2621
if (workflow?.status === expectedStatus) {
27-
if (process.env.CI && elapsed > 0) {
28-
console.log(
29-
`[waitForWorkflowStatus] workflowId=${workflowId} reached ${expectedStatus} in ${elapsed}ms`
30-
);
31-
}
3222
return workflow;
3323
}
3424

@@ -38,15 +28,6 @@ export const waitForWorkflowStatus = async (
3828
);
3929
}
4030

41-
lastStatus = workflow?.status;
42-
43-
if (process.env.CI && Date.now() - lastLogTime >= LOG_INTERVAL_MS) {
44-
lastLogTime = Date.now();
45-
console.log(
46-
`[waitForWorkflowStatus] workflowId=${workflowId} status=${workflow?.status ?? "undefined"} elapsed=${elapsed}ms (waiting for ${expectedStatus})`
47-
);
48-
}
49-
5031
lastError = undefined;
5132
await new Promise((resolve) => setTimeout(resolve, pollIntervalMs));
5233
} catch (error) {
@@ -60,8 +41,7 @@ export const waitForWorkflowStatus = async (
6041
throw new Error(`Failed to get workflow status: ${lastError}`);
6142
}
6243

63-
const lastStatusMsg = lastStatus !== undefined ? `; last status was ${lastStatus}` : "";
6444
throw new Error(
65-
`Workflow did not reach status ${expectedStatus} within ${maxWaitTimeMs}ms${lastStatusMsg}`
45+
`Workflow did not reach status ${expectedStatus} within ${maxWaitTimeMs}ms`
6646
);
6747
};

src/sdk/clients/worker/TaskRunner.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,6 @@ export class TaskRunner {
197197

198198
while (retryCount < this.maxRetries) {
199199
try {
200-
if (process.env.CI) {
201-
console.log(
202-
`[TaskRunner] Submitting task result taskId=${taskResult.taskId} workflowId=${taskResult.workflowInstanceId} taskType=${this.worker.taskDefName} attempt=${retryCount + 1}/${this.maxRetries}`
203-
);
204-
}
205200
const updateStart = Date.now();
206201
const { data: nextTask } = await TaskResource.updateTaskV2({
207202
client: this._client,
@@ -212,12 +207,6 @@ export class TaskRunner {
212207
});
213208
const updateDurationMs = Date.now() - updateStart;
214209

215-
if (process.env.CI) {
216-
console.log(
217-
`[TaskRunner] Task result accepted taskId=${taskResult.taskId} durationMs=${updateDurationMs}`
218-
);
219-
}
220-
221210
await this.eventDispatcher.publishTaskUpdateCompleted({
222211
taskType: this.worker.taskDefName,
223212
taskId: taskResult.taskId ?? "",
@@ -315,12 +304,6 @@ export class TaskRunner {
315304
const workflowInstanceId = task.workflowInstanceId as string;
316305
const startTime = Date.now();
317306

318-
if (process.env.CI) {
319-
console.log(
320-
`[TaskRunner] Executing task taskId=${taskId} workflowId=${workflowInstanceId} taskType=${this.worker.taskDefName}`
321-
);
322-
}
323-
324307
// Publish TaskExecutionStarted event
325308
await this.eventDispatcher.publishTaskExecutionStarted({
326309
taskType: this.worker.taskDefName,

0 commit comments

Comments
 (0)