Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Fix call to startscheduler #43

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"zetacomponents/console-tools" : ">=1.6",
"zetacomponents/base" : ">=1.8",
"kamisama/resque-status": ">=0.0.1",
"kamisama/php-resque-ex": "~1.2.5",
"kamisama/php-resque-ex-scheduler": "~1.2.2"
"kamisama/php-resque-ex": "dev-master",
"kamisama/php-resque-ex-scheduler": "dev-master"
},
"require-dev": {
"phpunit/phpunit": "~3.7.0",
Expand Down
8 changes: 5 additions & 3 deletions lib/Fresque.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

namespace Fresque;

date_default_timezone_set('UTC');

define('DS', DIRECTORY_SEPARATOR);
include __DIR__ . DS . 'DialogMenuValidator.php';
include __DIR__ . DS . 'SendSignalCommandOptions.php';
Expand Down Expand Up @@ -452,7 +454,7 @@ public function start($args = null, $scheduler = false)
return false;
}

$args['type'] = 'scheduler';
$this->runtime['type'] = 'scheduler';
}


Expand Down Expand Up @@ -752,7 +754,7 @@ public function load()
}

if ($this->runtime['Scheduler']['enabled'] === true) {
$this->startscheduler(array('debug' => $debug));
$this->startscheduler($this->runtime);
}

$this->output->outputLine();
Expand Down Expand Up @@ -974,7 +976,7 @@ public function stats()
$this->output->outputLine(' - Delayed Jobs : ' . number_format($delayedJobCount));

if ($delayedJobCount > 0) {
$this->output->outputLine(' - Next Job on : ' . strftime('%a %b %d %H:%M:%S %Z %Y', $schedulerWorker->nextDelayedTimestamp()));
$this->output->outputLine(' - Next Job on : ' . strftime('%a %b %d %H:%M:%S %Z %Y', $schedulerWorker->nextDelayedTimestamp(time()+(60*60*24*365))));
}
}
$this->output->outputLine("\n");
Expand Down