Selaa lähdekoodia

temp workaround for locked db

MarkusRost 4 vuotta sitten
vanhempi
sitoutus
f9a981821f
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      util/database.js

+ 2 - 2
util/database.js

@@ -5,7 +5,7 @@ const db = new sqlite3.Database( './wikibot.db', mode, dberror => {
 		console.log( '- ' + shardId + ': Error while connecting to the database: ' + dberror );
 		return dberror;
 	}
-	db.exec( 'PRAGMA foreign_keys = ON;', function (error) {
+	db.exec( 'PRAGMA foreign_keys = ON; PRAGMA busy_timeout = 100;', function (error) {
 		if ( error ) {
 			console.log( '- ' + shardId + ': Error while enabling the foreign key constraint: ' + error );
 		}
@@ -71,4 +71,4 @@ function getVoice(trysettings = 1) {
 	} );
 }
 
-module.exports = db;
+module.exports = db;