code style
This commit is contained in:
parent
03c7a52bc5
commit
d0a5fe1f4a
12
cron.php
12
cron.php
|
@ -38,8 +38,7 @@ function handleUnexpectedShutdown() {
|
|||
if (!TemporaryCronClass::$sent) {
|
||||
if (OC::$CLI) {
|
||||
echo 'Unexpected error!' . PHP_EOL;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
OC_JSON::error(array('data' => array('message' => 'Unexpected error!')));
|
||||
}
|
||||
}
|
||||
|
@ -67,8 +66,7 @@ if( $appmode == 'none' ) {
|
|||
TemporaryCronClass::$sent = true;
|
||||
if (OC::$CLI) {
|
||||
echo 'Background Jobs are disabled!' . PHP_EOL;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
OC_JSON::error(array('data' => array('message' => 'Background jobs disabled!')));
|
||||
}
|
||||
exit(1);
|
||||
|
@ -97,14 +95,12 @@ if( OC::$CLI ) {
|
|||
|
||||
// Work
|
||||
OC_BackgroundJob_Worker::doAllSteps();
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
// We call cron.php from some website
|
||||
if ($appmode == 'cron') {
|
||||
// Cron is cron :-P
|
||||
OC_JSON::error(array('data' => array('message' => 'Backgroundjobs are using system cron!')));
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
// Work and success :-)
|
||||
OC_BackgroundJob_Worker::doNextStep();
|
||||
OC_JSON::success();
|
||||
|
|
Loading…
Reference in New Issue