Skip to content

Commit

Permalink
Merge pull request activepieces#4063 from activepieces/fix/timeout
Browse files Browse the repository at this point in the history
fix: increase update flow timeout to 30 seconds
  • Loading branch information
abuaboud authored Feb 29, 2024
2 parents 793c2d1 + 8c86b6b commit 4cfc515
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/server/api/src/app/ee/helper/redis-system-job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const useRedis = system.get(SystemProp.QUEUE_MODE) === QueueMode.REDIS
type SystemJobHandler = (data: Job<SystemJobData, unknown>) => Promise<void>

let systemJobsQueue: Queue<SystemJobData, unknown>
let systemJobWorker: Worker<SystemJobData, unknown>
const SYSTEM_JOB_QUEUE = 'system-job-queue'

const handlers: Record<string, SystemJobHandler> = {}
Expand All @@ -37,7 +38,7 @@ export const redisSystemJob = {
)
await systemJobsQueue.waitUntilReady()

const systemJobWorker = new Worker<SystemJobData, unknown, ApId>(
systemJobWorker = new Worker<SystemJobData, unknown, ApId>(
SYSTEM_JOB_QUEUE,
async (job) => {
const handlerFn = handlers[job.name]
Expand Down Expand Up @@ -75,6 +76,7 @@ export const redisSystemJob = {
if (isNil(systemJobsQueue)) {
return
}
await systemJobWorker.close()
await systemJobsQueue.close()
},
}
2 changes: 1 addition & 1 deletion packages/server/api/src/app/flows/flow/flow.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export const flowService = {
const flowLock = lock
? await acquireLock({
key: id,
timeout: 10000,
timeout: 30000,
})
: null

Expand Down

0 comments on commit 4cfc515

Please sign in to comment.