From 889f0a1c6df51c5b6495445809143940ad17c327 Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Thu, 9 Aug 2012 10:40:39 +0200 Subject: [PATCH] rename appconfig keys for backgroundjobs --- cron.php | 8 ++++---- lib/backgroundjob/worker.php | 12 ++++++------ lib/base.php | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cron.php b/cron.php index 2bcaaff9fd..9d7e396d61 100644 --- a/cron.php +++ b/cron.php @@ -23,19 +23,19 @@ $RUNTIME_NOSETUPFS = true; require_once('lib/base.php'); -$appmode = OC_Appconfig::getValue( 'core', 'backgroundjob_mode', 'ajax' ); +$appmode = OC_Appconfig::getValue( 'core', 'backgroundjobs_mode', 'ajax' ); if( OC::$CLI ){ if( $appmode != 'cron' ){ - OC_Appconfig::setValue( 'core', 'backgroundjob_mode', 'cron' ); + OC_Appconfig::setValue( 'core', 'backgroundjobs_mode', 'cron' ); } // check if backgroundjobs is still running - $pid = OC_Appconfig::getValue( 'core', 'backgroundjob_pid', false ); + $pid = OC_Appconfig::getValue( 'core', 'backgroundjobs_pid', false ); if( $pid !== false ){ // FIXME: check if $pid is still alive (*nix/mswin). if so then exit } // save pid - OC_Appconfig::setValue( 'core', 'backgroundjob_pid', getmypid()); + OC_Appconfig::setValue( 'core', 'backgroundjobs_pid', getmypid()); // Work OC_BackgroundJob_Worker::doAllSteps(); diff --git a/lib/backgroundjob/worker.php b/lib/backgroundjob/worker.php index 7514a16b69..799fa5306c 100644 --- a/lib/backgroundjob/worker.php +++ b/lib/backgroundjob/worker.php @@ -60,11 +60,11 @@ class OC_BackgroundJob_Worker{ * services. */ public static function doNextStep(){ - $laststep = OC_Appconfig::getValue( 'core', 'backgroundjob_step', 'regular_tasks' ); + $laststep = OC_Appconfig::getValue( 'core', 'backgroundjobs_step', 'regular_tasks' ); if( $laststep == 'regular_tasks' ){ // get last app - $lasttask = OC_Appconfig::getValue( 'core', 'backgroundjob_task', '' ); + $lasttask = OC_Appconfig::getValue( 'core', 'backgroundjobs_task', '' ); // What's the next step? $regular_tasks = OC_BackgroundJob_RegularTask::all(); @@ -74,7 +74,7 @@ class OC_BackgroundJob_Worker{ // search for next background job foreach( $regular_tasks as $key => $value ){ if( strcmp( $lasttask, $key ) > 0 ){ - OC_Appconfig::getValue( 'core', 'backgroundjob_task', $key ); + OC_Appconfig::getValue( 'core', 'backgroundjobs_task', $key ); $done = true; call_user_func( $value ); break; @@ -83,7 +83,7 @@ class OC_BackgroundJob_Worker{ if( $done == false ){ // Next time load scheduled tasks - OC_Appconfig::setValue( 'core', 'backgroundjob_step', 'scheduled_tasks' ); + OC_Appconfig::setValue( 'core', 'backgroundjobs_step', 'scheduled_tasks' ); } } else{ @@ -99,8 +99,8 @@ class OC_BackgroundJob_Worker{ } else{ // Next time load scheduled tasks - OC_Appconfig::setValue( 'core', 'backgroundjob_step', 'regular_tasks' ); - OC_Appconfig::setValue( 'core', 'backgroundjob_task', '' ); + OC_Appconfig::setValue( 'core', 'backgroundjobs_step', 'regular_tasks' ); + OC_Appconfig::setValue( 'core', 'backgroundjobs_task', '' ); } } diff --git a/lib/base.php b/lib/base.php index 090d05cdba..ee80294dd9 100644 --- a/lib/base.php +++ b/lib/base.php @@ -234,7 +234,7 @@ class OC{ //OC_Util::addScript( "multiselect" ); OC_Util::addScript('search','result'); - if( OC_Appconfig::getValue( 'core', 'backgroundjob_mode', 'ajax' ) == 'ajax' ){ + if( OC_Appconfig::getValue( 'core', 'backgroundjobs_mode', 'ajax' ) == 'ajax' ){ OC_Util::addScript( 'backgroundjobs' ); }