From d3c598ae01ddf5bfd37c57073e87130498d958b9 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Thu, 22 Jun 2017 00:22:50 +0200 Subject: [PATCH] Command Timeout set to 60 --- src/NadekoBot/Services/Database/NadekoContext.cs | 3 ++- src/NadekoBot/Services/DbService.cs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NadekoBot/Services/Database/NadekoContext.cs b/src/NadekoBot/Services/Database/NadekoContext.cs index b61c9aa9..238130ed 100644 --- a/src/NadekoBot/Services/Database/NadekoContext.cs +++ b/src/NadekoBot/Services/Database/NadekoContext.cs @@ -18,8 +18,9 @@ namespace NadekoBot.Services.Database public NadekoContext Create(DbContextFactoryOptions options) { var optionsBuilder = new DbContextOptionsBuilder(); - optionsBuilder.UseSqlite("Filename=./data/NadekoBot.db;Default Command Timeout=60000;Busy Timeout=60000"); + optionsBuilder.UseSqlite("Filename=./data/NadekoBot.db"); var ctx = new NadekoContext(optionsBuilder.Options); + ctx.Database.SetCommandTimeout(60); return ctx; } } diff --git a/src/NadekoBot/Services/DbService.cs b/src/NadekoBot/Services/DbService.cs index 81e56d1d..c8fab899 100644 --- a/src/NadekoBot/Services/DbService.cs +++ b/src/NadekoBot/Services/DbService.cs @@ -32,6 +32,7 @@ namespace NadekoBot.Services public NadekoContext GetDbContext() { var context = new NadekoContext(options); + context.Database.SetCommandTimeout(60); context.Database.Migrate(); context.EnsureSeedData();