Add runCleanupTasks method to XLVask tasks, including module enablement check and task execution logic

This commit is contained in:
Jepp9350
2025-06-16 11:51:39 +02:00
parent 8edc0f9312
commit 5693d30c47
@@ -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
}
}