Global reformat

This commit is contained in:
Daniel Mason 2018-05-25 21:03:48 +12:00
parent 14c0e26559
commit 51fda513f4
11 changed files with 532 additions and 533 deletions

View file

@ -1,6 +1,6 @@
<?php
if(empty($argv[1])) {
die('Specify the ID of a job to monitor the status of.');
if (empty($argv[1])) {
die('Specify the ID of a job to monitor the status of.');
}
require __DIR__ . '/init.php';
@ -12,12 +12,12 @@ Resque::setBackend('127.0.0.1:6379');
//Resque::setBackend('redis://user:pass@a.host.name:3432/2');
$status = new Resque_Job_Status($argv[1]);
if(!$status->isTracking()) {
die("Resque is not tracking the status of this job.\n");
if (!$status->isTracking()) {
die("Resque is not tracking the status of this job.\n");
}
echo "Tracking status of ".$argv[1].". Press [break] to stop.\n\n";
while(true) {
fwrite(STDOUT, "Status of ".$argv[1]." is: ".$status->get()."\n");
sleep(1);
echo "Tracking status of " . $argv[1] . ". Press [break] to stop.\n\n";
while (true) {
fwrite(STDOUT, "Status of " . $argv[1] . " is: " . $status->get() . "\n");
sleep(1);
}