Possible database lock fix
This commit is contained in:
parent
d2ea530c10
commit
ee72962ee5
@ -285,9 +285,10 @@ namespace NadekoBot.Modules.Utility
|
|||||||
{
|
{
|
||||||
if (--page < 0)
|
if (--page < 0)
|
||||||
return;
|
return;
|
||||||
var statuses = _bot.ShardCoord.Statuses.ToArray();
|
var statuses = _bot.ShardCoord.Statuses.ToArray()
|
||||||
|
.Where(x => x != null);
|
||||||
|
|
||||||
var status = string.Join(", ", statuses
|
var status = string.Join(", ", statuses
|
||||||
.Where(x => x != null)
|
|
||||||
.GroupBy(x => x.ConnectionState)
|
.GroupBy(x => x.ConnectionState)
|
||||||
.Select(x => $"{x.Count()} {x.Key}")
|
.Select(x => $"{x.Count()} {x.Key}")
|
||||||
.ToArray());
|
.ToArray());
|
||||||
|
@ -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");
|
optionsBuilder.UseSqlite("Filename=./data/NadekoBot.db;Default Command Timeout=60000;Busy Timeout=60000");
|
||||||
return new NadekoContext(optionsBuilder.Options);
|
var ctx = new NadekoContext(optionsBuilder.Options);
|
||||||
|
return ctx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user