This commit is contained in:
Patrick Niebeling
2025-03-12 11:29:30 +01:00
parent 9538c99576
commit 1e46c19f1b
14 changed files with 202 additions and 130 deletions

18
lib/WorkflowJob.php Normal file
View File

@ -0,0 +1,18 @@
<?php
namespace OCA\Deckflow;
use OC\BackgroundJob\TimedJob;
use OCP\BackgroundJob\IJob;
class WorkflowJob extends TimedJob {
public function run($argument) {
// Hole überfällige Workflows und verschiebe Karten
$workflowRepo = new WorkflowRepository();
$overdueWorkflows = $workflowRepo->getOverdueWorkflows();
foreach ($overdueWorkflows as $workflow) {
$workflowRepo->moveCardToTargetStack($workflow['card_id'], $workflow['target_stack_id']);
}
}
}