示例#1
0
文件: jobs.php 项目: alerque/bibledit
 public static function getInstance()
 {
     if (empty(self::$instance)) {
         self::$instance = new Database_Jobs();
     }
     return self::$instance;
 }
示例#2
0
 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);
 }
示例#3
0
$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();