Added set_timeout to database and engine

This commit is contained in:
Matthew Barbour
2019-10-14 13:31:12 -05:00
committed by Shish
parent 702f098ea6
commit 3efa76c6a2
6 changed files with 31 additions and 14 deletions

View File

@@ -191,9 +191,7 @@ class Upgrade extends Extension
break;
}
if ($database->get_driver_name()==DatabaseDriver::PGSQL) { // These updates can take a little bit
$database->execute("SET statement_timeout TO 300000;");
}
$database->set_timeout(300000); // These updates can take a little bit
log_info("upgrade", "Setting index for ext column");
$database->execute('CREATE INDEX images_ext_idx ON images(ext)');