Skip to content

Commit

Permalink
Merge pull request #951 from proditis/dont-powerup-ondemand
Browse files Browse the repository at this point in the history
dont spin ondemand targets rather pull them
  • Loading branch information
proditis authored May 4, 2023
2 parents b306389 + 3fc184c commit 890abb0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions backend/commands/CronController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 890abb0

Please sign in to comment.