From 3f81474c4bffbcc67927cf2f71837130081f898b Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Thu, 3 Oct 2013 16:57:28 +0200 Subject: [PATCH] Scheduler cleanup --- lib/classes/phrasea.php | 46 ---------------------------------- lib/conf.d/bases_structure.xml | 40 ----------------------------- 2 files changed, 86 deletions(-) diff --git a/lib/classes/phrasea.php b/lib/classes/phrasea.php index 618a62a856..911cbb4663 100644 --- a/lib/classes/phrasea.php +++ b/lib/classes/phrasea.php @@ -30,24 +30,6 @@ class phrasea const CACHE_SBAS_FROM_BAS = 'sbas_from_bas'; const CACHE_SBAS_PARAMS = 'sbas_params'; - public static function is_scheduler_started(Application $app) - { - $retval = false; - $conn = connection::getPDOConnection($app); - $sql = 'SELECT schedstatus FROM sitepreff'; - - $stmt = $conn->prepare($sql); - $stmt->execute(); - $row = $stmt->fetch(PDO::FETCH_ASSOC); - $stmt->closeCursor(); - - if ($row && $row['schedstatus'] != 'stopped') { - $retval = true; - } - - return $retval; - } - public static function clear_sbas_params(Application $app) { self::$_sbas_params = null; @@ -286,32 +268,4 @@ class phrasea return 'Unknown collection'; } - - public static function scheduler_key(Application $app, $renew = false) - { - $conn = connection::getPDOConnection($app); - - $schedulerkey = false; - - $sql = 'SELECT schedulerkey FROM sitepreff'; - - $stmt = $conn->prepare($sql); - $stmt->execute(); - $row = $stmt->fetch(PDO::FETCH_ASSOC); - $stmt->closeCursor(); - - if ($row) { - $schedulerkey = trim($row['schedulerkey']); - } - - if ($renew === true || $schedulerkey == '') { - $schedulerkey = random::generatePassword(20); - $sql = 'UPDATE sitepreff SET schedulerkey = :scheduler_key'; - $stmt = $conn->prepare($sql); - $stmt->execute(array(':scheduler_key' => $schedulerkey)); - $stmt->closeCursor(); - } - - return $schedulerkey; - } } diff --git a/lib/conf.d/bases_structure.xml b/lib/conf.d/bases_structure.xml index 6c96679081..fe093c9c22 100644 --- a/lib/conf.d/bases_structure.xml +++ b/lib/conf.d/bases_structure.xml @@ -2293,43 +2293,6 @@ 0000-00-00 00:00:00 - - schedstatus - - enum('stopped','stopping','started','tostop') - - - - stopped - - ascii_bin - - - schedqtime - datetime - - - 0000-00-00 00:00:00 - - - - schedpid - int(11) - YES - - - - - - - - schedulerkey - char(20) - YES - - - - @@ -2355,9 +2318,6 @@ 0000-00-00 - stopped - - InnoDB