Add runCleanupTasks method to XLVask tasks, including module enablement check and task execution logic
This commit is contained in:
@@ -36,6 +36,7 @@ class xlvask_tasks
|
||||
// Synchronize users, this will keep the users (XL Vask customer objects) in cache up to date
|
||||
$this->runSyncUsers(true);
|
||||
$this->runSyncUsage();
|
||||
$this->runCleanupTasks();
|
||||
};
|
||||
}
|
||||
|
||||
@@ -348,4 +349,19 @@ class xlvask_tasks
|
||||
// Return the order object
|
||||
return $order;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the cleanup tasks
|
||||
* This task is used to clean up the XL Vask module.
|
||||
* @return void
|
||||
* @throws Exception If the task fails
|
||||
*/
|
||||
public function runCleanupTasks(): void
|
||||
{
|
||||
// Define the XL Vask object
|
||||
$xlvask = new \classes\xlvask();
|
||||
// Require the module to be enabled
|
||||
$xlvask->requireModuleEnabled();
|
||||
// Run
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user