summaryrefslogtreecommitdiffstats
path: root/lib/backgroundjob/scheduledtask.php
diff options
context:
space:
mode:
authorJakob Sack <mail@jakobsack.de>2012-08-09 19:04:04 +0200
committerJakob Sack <mail@jakobsack.de>2012-08-09 19:04:04 +0200
commitceda0ae0525d66417b4cf8e39e8cedbcbd5f6258 (patch)
treee77d9ad120668d38750daa69889c01152e9e8d7a /lib/backgroundjob/scheduledtask.php
parent1ce2cd73ffd9c76912f8ba03809a5b347cec38a9 (diff)
downloadnextcloud-server-ceda0ae0525d66417b4cf8e39e8cedbcbd5f6258.tar.gz
nextcloud-server-ceda0ae0525d66417b4cf8e39e8cedbcbd5f6258.zip
Backgroundjobs: rename ScheduledTask to QueuedTask
Diffstat (limited to 'lib/backgroundjob/scheduledtask.php')
-rw-r--r--lib/backgroundjob/scheduledtask.php25
1 files changed, 12 insertions, 13 deletions
diff --git a/lib/backgroundjob/scheduledtask.php b/lib/backgroundjob/scheduledtask.php
index 47f332a204a..da5d4ddc694 100644
--- a/lib/backgroundjob/scheduledtask.php
+++ b/lib/backgroundjob/scheduledtask.php
@@ -21,22 +21,22 @@
*/
/**
- * This class manages our scheduled tasks.
+ * This class manages our queued tasks.
*/
-class OC_BackgroundJob_ScheduledTask{
+class OC_BackgroundJob_QueuedTask{
/**
- * @brief Gets one scheduled task
+ * @brief Gets one queued task
* @param $id ID of the task
* @return associative array
*/
public static function find( $id ){
- $stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*scheduledtasks WHERE id = ?' );
+ $stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*queuedtasks WHERE id = ?' );
$result = $stmt->execute(array($id));
return $result->fetchRow();
}
/**
- * @brief Gets all scheduled tasks
+ * @brief Gets all queued tasks
* @return array with associative arrays
*/
public static function all(){
@@ -44,18 +44,17 @@ class OC_BackgroundJob_ScheduledTask{
$return = array();
// Get Data
- $stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*scheduledtasks' );
+ $stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*queuedtasks' );
$result = $stmt->execute(array());
while( $row = $result->fetchRow()){
$return[] = $row;
}
- // Und weg damit
return $return;
}
/**
- * @brief Gets all scheduled tasks of a specific app
+ * @brief Gets all queued tasks of a specific app
* @param $app app name
* @return array with associative arrays
*/
@@ -64,7 +63,7 @@ class OC_BackgroundJob_ScheduledTask{
$return = array();
// Get Data
- $stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*scheduledtasks WHERE app = ?' );
+ $stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*queuedtasks WHERE app = ?' );
$result = $stmt->execute(array($app));
while( $row = $result->fetchRow()){
$return[] = $row;
@@ -75,7 +74,7 @@ class OC_BackgroundJob_ScheduledTask{
}
/**
- * @brief schedules a task
+ * @brief queues a task
* @param $app app name
* @param $klass class name
* @param $method method name
@@ -83,21 +82,21 @@ class OC_BackgroundJob_ScheduledTask{
* @return id of task
*/
public static function add( $task, $klass, $method, $parameters ){
- $stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*scheduledtasks (app, klass, method, parameters) VALUES(?,?,?,?)' );
+ $stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*queuedtasks (app, klass, method, parameters) VALUES(?,?,?,?)' );
$result = $stmt->execute(array($app, $klass, $method, $parameters, time));
return OC_DB::insertid();
}
/**
- * @brief deletes a scheduled task
+ * @brief deletes a queued task
* @param $id id of task
* @return true/false
*
* Deletes a report
*/
public static function delete( $id ){
- $stmt = OC_DB::prepare( 'DELETE FROM *PREFIX*scheduledtasks WHERE id = ?' );
+ $stmt = OC_DB::prepare( 'DELETE FROM *PREFIX*queuedtasks WHERE id = ?' );
$result = $stmt->execute(array($id));
return true;