MCPcopy Index your code
hub / github.com/coder/mux / hasActiveTaskOwnedWork

Method hasActiveTaskOwnedWork

src/node/services/taskService.ts:6778–6790  ·  view source on GitHub ↗
(
    workspaceId: string,
    taskIndex: AgentTaskIndex
  )

Source from the content-addressed store, hash-verified

6776 }
6777
6778 private async hasActiveTaskOwnedWork(
6779 workspaceId: string,
6780 taskIndex: AgentTaskIndex
6781 ): Promise<boolean> {
6782 assert(workspaceId.length > 0, "hasActiveTaskOwnedWork requires workspaceId");
6783 if (this.hasActiveDescendantAgentTasksUsingIndex(taskIndex, workspaceId)) {
6784 return true;
6785 }
6786 if ((await this.listActiveWorkspaceTurnTaskIdsForOwner(workspaceId)).length > 0) {
6787 return true;
6788 }
6789 return (await this.listActiveWorkflowRunIdsForWorkspace(workspaceId)).length > 0;
6790 }
6791
6792 private async hasBlockingActiveWorkForTerminalDrain(
6793 workspaceId: string,

Tested by

no test coverage detected