Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
Cleanup up dead code and database tables from task scheduler
Browse files Browse the repository at this point in the history
Turns out there was a lot of code and various database tables that had
no functionality at all
  • Loading branch information
Jamie Snape committed Aug 14, 2014
1 parent 0d5a41f commit a81f794
Show file tree
Hide file tree
Showing 2,282 changed files with 121 additions and 342,537 deletions.
12 changes: 4 additions & 8 deletions modules/scheduler/configs/module.ini
@@ -1,9 +1,5 @@
[global]
; version of the module
version = 1.0.0
; full name
fullname = Task Scheduler
; description
description =
; category
category = Core
version = 1.1.0
fullname = "Task Scheduler"
description = "Schedules periodic background tasks"
category = Core
8 changes: 4 additions & 4 deletions modules/scheduler/constant/module.php
Expand Up @@ -18,7 +18,7 @@
limitations under the License.
=========================================================================*/

define("SCHEDULER_JOB_STATUS_TORUN", 0);
define("SCHEDULER_JOB_STATUS_STARTED", 1);
define("SCHEDULER_JOB_STATUS_DONE", 2);
define("SCHEDULER_JOB_STATUS_FAILED", 3);
define('SCHEDULER_JOB_STATUS_TORUN', 0);
define('SCHEDULER_JOB_STATUS_STARTED', 1);
define('SCHEDULER_JOB_STATUS_DONE', 2);
define('SCHEDULER_JOB_STATUS_FAILED', 3);
5 changes: 1 addition & 4 deletions modules/scheduler/controllers/ConfigController.php
Expand Up @@ -21,15 +21,12 @@
/** Config controller for the scheduler module */
class Scheduler_ConfigController extends Scheduler_AppController
{
public $_moduleForms = array('Config');
public $_components = array('Utility', 'Date');
public $_moduleModels = array('Job', 'JobLog');

/** index action*/
/** Index action */
function indexAction()
{
$this->requireAdminPrivileges();

$this->view->jobs = $this->Scheduler_Job->getJobsToRun();
$this->view->jobsErrors = $this->Scheduler_Job->getLastErrors();
}
Expand Down
8 changes: 0 additions & 8 deletions modules/scheduler/controllers/RunController.php
Expand Up @@ -25,14 +25,6 @@ class Scheduler_RunController extends Scheduler_AppController
public $_moduleModels = array('Job', 'JobLog');
public $_components = array('Json');

/**
* @method initAction()
* Index Action (first action when we access the application)
*/
function init()
{
} // end method indexAction

/** Index action */
function indexAction()
{
Expand Down
93 changes: 0 additions & 93 deletions modules/scheduler/controllers/WorkflowController.php

This file was deleted.

48 changes: 0 additions & 48 deletions modules/scheduler/controllers/components/EzcComponent.php

This file was deleted.

40 changes: 0 additions & 40 deletions modules/scheduler/controllers/forms/ConfigForm.php

This file was deleted.

81 changes: 0 additions & 81 deletions modules/scheduler/database/mysql/1.0.0.sql

This file was deleted.

21 changes: 21 additions & 0 deletions modules/scheduler/database/mysql/1.1.0.sql
@@ -0,0 +1,21 @@
CREATE TABLE IF NOT EXISTS `scheduler_job` (
`job_id` bigint(20) AUTO_INCREMENT,
`task` varchar(512) NOT NULL,
`run_only_once` tinyint(4) NOT NULL,
`fire_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`time_last_fired` timestamp,
`time_interval` bigint(20),
`priority` tinyint(4),
`status` tinyint(4),
`params` text,
`creator_id` bigint(20),
PRIMARY KEY (`job_id`)
) DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `scheduler_job_log` (
`log_id` bigint(20) AUTO_INCREMENT,
`job_id` bigint(20),
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`log` text,
PRIMARY KEY (`log_id`)
) DEFAULT CHARSET=utf8;

0 comments on commit a81f794

Please sign in to comment.