Increase the Flowable's polling time to 60 seconds to poll timer and async jobs table

This commit is contained in:
Ram Narayan Balaji 2025-09-07 19:41:22 +05:30
parent 52c3c82ead
commit 8deff55f9e
4 changed files with 43 additions and 3 deletions

View File

@ -18,4 +18,14 @@ WHERE configType = 'entityRulesSettings'
JSON_QUOTE('Data Product Domain Validation')
);
-- Increase Flowable ACTIVITY_ID_ column size to support longer user-defined workflow node names
ALTER TABLE ACT_RU_EVENT_SUBSCR MODIFY ACTIVITY_ID_ varchar(255);
ALTER TABLE ACT_RU_EVENT_SUBSCR MODIFY ACTIVITY_ID_ varchar(255);
-- Update workflow settings with new job acquisition interval settings
UPDATE openmetadata_settings
SET json = JSON_SET(
json,
'$.executorConfiguration.asyncJobAcquisitionInterval', 60000,
'$.executorConfiguration.timerJobAcquisitionInterval', 60000
)
WHERE configType = 'workflowSettings'
AND JSON_EXTRACT(json, '$.executorConfiguration') IS NOT NULL;

View File

@ -20,4 +20,20 @@ WHERE configtype = 'entityRulesSettings'
WHERE rule->>'name' = 'Data Product Domain Validation'
);
-- Increase Flowable ACTIVITY_ID_ column size to support longer user-defined workflow node names
ALTER TABLE ACT_RU_EVENT_SUBSCR ALTER COLUMN ACTIVITY_ID_ TYPE varchar(255);
ALTER TABLE ACT_RU_EVENT_SUBSCR ALTER COLUMN ACTIVITY_ID_ TYPE varchar(255);
-- Update workflow settings with new job acquisition interval settings
UPDATE openmetadata_settings
SET json = jsonb_set(
jsonb_set(
json,
'{executorConfiguration,asyncJobAcquisitionInterval}',
'60000',
true
),
'{executorConfiguration,timerJobAcquisitionInterval}',
'60000',
true
)
WHERE configtype = 'workflowSettings'
AND json->'executorConfiguration' IS NOT NULL;

View File

@ -123,7 +123,11 @@ public class WorkflowHandler {
.setAsyncExecutorAsyncJobLockTimeInMillis(
workflowSettings.getExecutorConfiguration().getJobLockTimeInMillis())
.setAsyncExecutorMaxAsyncJobsDuePerAcquisition(
workflowSettings.getExecutorConfiguration().getTasksDuePerAcquisition());
workflowSettings.getExecutorConfiguration().getTasksDuePerAcquisition())
.setAsyncExecutorDefaultAsyncJobAcquireWaitTime(
workflowSettings.getExecutorConfiguration().getAsyncJobAcquisitionInterval())
.setAsyncExecutorDefaultTimerJobAcquireWaitTime(
workflowSettings.getExecutorConfiguration().getTimerJobAcquisitionInterval());
// Setting History CleanUp
processEngineConfiguration

View File

@ -33,6 +33,16 @@
"type": "integer",
"default": 1296000000,
"description": "The amount of time a Job gets locked before being retried. Default: 15 Days. This avoids jobs that takes too long to run being retried while running."
},
"asyncJobAcquisitionInterval": {
"type": "integer",
"default": 60000,
"description": "The interval in milliseconds to acquire async jobs. Default: 60 seconds. This controls how often Flowable polls for new jobs."
},
"timerJobAcquisitionInterval": {
"type": "integer",
"default": 60000,
"description": "The interval in milliseconds to acquire timer jobs. Default: 60 seconds. This controls how often Flowable polls for scheduled jobs."
}
},
"additionalProperties": false