Skip to content
Snippets Groups Projects
Commit eb09226e authored by Uma's avatar Uma
Browse files

Fixes #1510 Cleanup scheduled workflow count

parent cc4da8d2
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@ class VTWorkflowManager{
function __construct($adb){
$this->adb = $adb;
$this->setMaxAllowedScheduledWorkflows();
}
function save($workflow){
......@@ -105,13 +106,24 @@ class VTWorkflowManager{
$result = $adb->pquery($query, $params);
return $adb->query_result($result, 0, 'count');
}
/**
* Function to set max allowed scheduled workflow count as per global defaults
*/
function setMaxAllowedScheduledWorkflows(){
global $max_scheduled_workflows;
if(!empty($max_scheduled_workflows)){
vglobal('max_scheduled_workflows', $max_scheduled_workflows);
}else{
vglobal('max_scheduled_workflows', 10);
}
}
/**
* Function returns the maximum allowed scheduled workflows
* @return int
*/
function getMaxAllowedScheduledWorkflows() {
vglobal('max_scheduled_workflows', 10);
return vglobal('max_scheduled_workflows');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment