public static function getInstance() { if (empty(self::$instance)) { self::$instance = new Database_Jobs(); } return self::$instance; }
public function testResult() { $database_jobs = Database_Jobs::getInstance(); $id = $database_jobs->getNewId(); $result = $database_jobs->getResult($id); $this->assertNull($result); $database_jobs->setResult($id, "result"); $result = $database_jobs->getResult($id); $this->assertEquals("result", $result); }
$database->optimize(); $database = Database_Ipc::getInstance(); $database->trim(); $database = Database_Notes::getInstance(); $database->trim(); if (!$client_mode) { $database->trim_server(); } $database->optimize(); $database = Database_Shell::getInstance(); $database->trim(); $database->optimize(); $database = Database_Check::getInstance(); $database->optimize(); unlink("../databases/volatile.sqlite"); $database = Database_Volatile::getInstance(); $database->create(); $database = Database_Sprint::getInstance(); $database->optimize(); unlink("../databases/navigation.sqlite"); $database = Database_Navigation::getInstance(); $database->create(); $database = Database_History::getInstance(); $database->optimize(); $database = Database_Commits::getInstance(); $database->optimize(); $database = Database_Jobs::getInstance(); $database->trim(); $database->optimize(); $database = Database_Config_User::getInstance(); $database->trim();