diff --git a/lib/backgroundjobs/regulartask.php b/lib/backgroundjobs/regulartask.php index 38c1255d76..5c416fcdb0 100644 --- a/lib/backgroundjobs/regulartask.php +++ b/lib/backgroundjobs/regulartask.php @@ -23,7 +23,7 @@ /** * This class manages the regular tasks. */ -class OC_Backgroundjobs_RegularTask{ +class OC_BackgroundJob_RegularTask{ static private $registered = array(); /** @@ -32,7 +32,7 @@ class OC_Backgroundjobs_RegularTask{ * @param $method method name * @return true */ - static public function create( $klass, $method ){ + static public function register( $klass, $method ){ // Create the data structure self::$registered["$klass-$method"] = array( $klass, $method ); diff --git a/lib/backgroundjobs/scheduledtask.php b/lib/backgroundjobs/scheduledtask.php index 48a863c906..5a2166175c 100644 --- a/lib/backgroundjobs/scheduledtask.php +++ b/lib/backgroundjobs/scheduledtask.php @@ -1,5 +1,4 @@ $value ){ call_user_func( $value ); } // Do our scheduled tasks - $scheduled_tasks = OC_Backgroundjobs_ScheduledTask::all(); + $scheduled_tasks = OC_BackgroundJob_ScheduledTask::all(); foreach( $scheduled_tasks as $task ){ call_user_func( array( $task['klass'], $task['method'] ), $task['parameters'] ); - OC_Backgroundjobs_ScheduledTask::delete( $task['id'] ); + OC_BackgroundJob_ScheduledTask::delete( $task['id'] ); } return true; @@ -67,7 +67,7 @@ class OC_Backgroundjobs_Worker{ $lasttask = OC_Appconfig::getValue( 'core', 'backgroundjobs_task', '' ); // What's the next step? - $regular_tasks = OC_Backgroundjobs_RegularTask::all(); + $regular_tasks = OC_BackgroundJob_RegularTask::all(); ksort( $regular_tasks ); $done = false; @@ -87,12 +87,12 @@ class OC_Backgroundjobs_Worker{ } } else{ - $tasks = OC_Backgroundjobs_ScheduledTask::all(); + $tasks = OC_BackgroundJob_ScheduledTask::all(); if( length( $tasks )){ $task = $tasks[0]; // delete job before we execute it. This prevents endless loops // of failing jobs. - OC_Backgroundjobs_ScheduledTask::delete($task['id']); + OC_BackgroundJob_ScheduledTask::delete($task['id']); // execute job call_user_func( array( $task['klass'], $task['method'] ), $task['parameters'] );