Skip to content

Commit 890abb0

Browse files
authored
Merge pull request #951 from proditis/dont-powerup-ondemand
dont spin ondemand targets rather pull them
2 parents b306389 + 3fc184c commit 890abb0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

backend/commands/CronController.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,14 @@ public function actionPowerups()
405405
{
406406
printf("Target %s ", $target->fqdn);
407407
try {
408-
printf("scheduled for [%s] at %s, spin: %s\n", $target->status, $target->scheduled_at, $target->spin() ? "success" : "fail");
409-
$target->pull();
408+
if(!$target->onDemand)
409+
{
410+
printf("scheduled for [%s] at %s, spin: %s\n", $target->status, $target->scheduled_at, $target->spin() ? "success" : "fail");
411+
}
412+
else
413+
{
414+
printf("scheduled for [%s] at %s, pull: %s\n", $target->status, $target->scheduled_at, $target->pull() ? "success" : "fail");
415+
}
410416
$target->status='online';
411417
$target->scheduled_at=null;
412418
$target->active=1;

0 commit comments

Comments
 (0)