From 9c9dc276b7a1d2592c4fb0a887888632dc1f1e29 Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Wed, 25 Sep 2013 13:36:30 +0200 Subject: move the private namespace OC into lib/private - OCP will stay in lib/public Conflicts: lib/private/vcategories.php --- lib/private/backgroundjob/queuedjob.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 lib/private/backgroundjob/queuedjob.php (limited to 'lib/private/backgroundjob/queuedjob.php') diff --git a/lib/private/backgroundjob/queuedjob.php b/lib/private/backgroundjob/queuedjob.php new file mode 100644 index 00000000000..1714182820d --- /dev/null +++ b/lib/private/backgroundjob/queuedjob.php @@ -0,0 +1,28 @@ + + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OC\BackgroundJob; + +/** + * Class QueuedJob + * + * create a background job that is to be executed once + * + * @package OC\BackgroundJob + */ +abstract class QueuedJob extends Job { + /** + * run the job, then remove it from the joblist + * + * @param JobList $jobList + */ + public function execute($jobList) { + $jobList->remove($this); + $this->run($this->argument); + } +} -- cgit v1.2.3