mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-17 18:05:42 +02:00
Action types for approval requests, enable field synchronization for … (#10565)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -284,7 +284,7 @@ async function processExecution (control: ProcessControl, record: ProcessMessage
|
||||
}
|
||||
}
|
||||
if (isRollback(record)) {
|
||||
await rollback(control, record, execution)
|
||||
await rollback(control, execution)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,7 +298,8 @@ function isRollback (record: ProcessMessage): boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
async function rollback (control: ProcessControl, record: ProcessMessage, execution: Execution): Promise<void> {
|
||||
async function rollback (control: ProcessControl, execution: Execution): Promise<void> {
|
||||
if (execution.rollback.length === 0) return
|
||||
const rollbackTxes = execution.rollback.pop() ?? []
|
||||
for (const tx of rollbackTxes) {
|
||||
const timeout = setTimeout(() => {
|
||||
@@ -719,6 +720,12 @@ async function fillParams<T extends Doc> (
|
||||
execution: Execution,
|
||||
control: ProcessControl
|
||||
): Promise<MethodParams<T>> {
|
||||
if (!control.cache.has(execution.card)) {
|
||||
const card = await control.client.findOne(cardPlugin.class.Card, { _id: execution.card })
|
||||
if (card !== undefined) {
|
||||
control.cache.set(execution.card, card)
|
||||
}
|
||||
}
|
||||
const res: MethodParams<T> = {}
|
||||
for (const key in params) {
|
||||
const value = control.client.getHierarchy().clone((params as any)[key])
|
||||
|
||||
@@ -26,7 +26,7 @@ export interface Config {
|
||||
const config: Config = {
|
||||
DbUrl: process.env.DB_URL ?? 'postgres://localhost:5432/huly',
|
||||
PollInterval: process.env.POLL_INTERVAL != null ? Number(process.env.POLL_INTERVAL) : 20000,
|
||||
QueueRegion: process.env.QUEUE_REGION ?? 'cockroach',
|
||||
QueueRegion: process.env.QUEUE_REGION ?? '',
|
||||
QueueConfig: process.env.QUEUE_CONFIG ?? ''
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user