mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-22 01:25:00 +02:00
Fix process time (#9900)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Card } from '@hcengineering/card'
|
||||
import { Doc, MeasureContext, PersonId, Ref, Tx, TxOperations } from '@hcengineering/core'
|
||||
import { Doc, MeasureContext, PersonId, Ref, Tx, TxOperations, WorkspaceUuid } from '@hcengineering/core'
|
||||
import { Execution, ExecutionError, MethodParams, Trigger, UserResult } from '@hcengineering/process'
|
||||
|
||||
export type ExecuteFunc = (
|
||||
@@ -42,6 +42,7 @@ export interface ProcessControl {
|
||||
client: TxOperations
|
||||
cache: Map<string, any>
|
||||
messageContext: Record<string, any>
|
||||
workspace: WorkspaceUuid
|
||||
}
|
||||
|
||||
export type RollbackFunc = (context: Record<string, any>, control: ProcessControl) => Tx
|
||||
|
||||
@@ -67,7 +67,8 @@ export async function messageHandler (record: ProcessMessage, ws: WorkspaceUuid,
|
||||
ctx,
|
||||
client,
|
||||
cache: new Map<string, any>(),
|
||||
messageContext: record.context
|
||||
messageContext: record.context,
|
||||
workspace: ws
|
||||
}
|
||||
ctx.info('Processing event', { event: record.event, ws, record })
|
||||
if (record.execution !== undefined) {
|
||||
@@ -528,7 +529,7 @@ async function setTimer (
|
||||
await temporalClient.workflow.signalWithStart('processTimeWorkflow', {
|
||||
taskQueue: 'process',
|
||||
signal: 'setDate',
|
||||
args: [targetDate, 'workspace', execution._id],
|
||||
args: [targetDate, control.workspace, execution._id],
|
||||
signalArgs: [targetDate],
|
||||
workflowId: `${execution._id}_${transition._id}`,
|
||||
searchAttributes: {
|
||||
|
||||
Reference in New Issue
Block a user