From 3fc184c78ac87850ae4561a9aa486daea480b759 Mon Sep 17 00:00:00 2001 From: Pantelis Roditis Date: Thu, 4 May 2023 10:43:19 +0300 Subject: [PATCH] dont spin ondemand targets rather pull them --- backend/commands/CronController.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/backend/commands/CronController.php b/backend/commands/CronController.php index 934da4806..f89f64f3a 100644 --- a/backend/commands/CronController.php +++ b/backend/commands/CronController.php @@ -405,8 +405,14 @@ public function actionPowerups() { printf("Target %s ", $target->fqdn); try { - printf("scheduled for [%s] at %s, spin: %s\n", $target->status, $target->scheduled_at, $target->spin() ? "success" : "fail"); - $target->pull(); + if(!$target->onDemand) + { + printf("scheduled for [%s] at %s, spin: %s\n", $target->status, $target->scheduled_at, $target->spin() ? "success" : "fail"); + } + else + { + printf("scheduled for [%s] at %s, pull: %s\n", $target->status, $target->scheduled_at, $target->pull() ? "success" : "fail"); + } $target->status='online'; $target->scheduled_at=null; $target->active=1;