Command Timeout set to 60
This commit is contained in:
parent
ee72962ee5
commit
d3c598ae01
@ -18,8 +18,9 @@ namespace NadekoBot.Services.Database
|
|||||||
public NadekoContext Create(DbContextFactoryOptions options)
|
public NadekoContext Create(DbContextFactoryOptions options)
|
||||||
{
|
{
|
||||||
var optionsBuilder = new DbContextOptionsBuilder();
|
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);
|
var ctx = new NadekoContext(optionsBuilder.Options);
|
||||||
|
ctx.Database.SetCommandTimeout(60);
|
||||||
return ctx;
|
return ctx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,7 @@ namespace NadekoBot.Services
|
|||||||
public NadekoContext GetDbContext()
|
public NadekoContext GetDbContext()
|
||||||
{
|
{
|
||||||
var context = new NadekoContext(options);
|
var context = new NadekoContext(options);
|
||||||
|
context.Database.SetCommandTimeout(60);
|
||||||
context.Database.Migrate();
|
context.Database.Migrate();
|
||||||
context.EnsureSeedData();
|
context.EnsureSeedData();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user