Skip to content

Commit

Permalink
Update DatabaseManager.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
gfs committed Mar 11, 2020
1 parent 4ba21a7 commit 7d64b6f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Lib/Utils/DatabaseManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,12 @@ public static bool Setup(string filename = null, int shardingFactor = 1, int flu
SetSettings(new Settings()
{
SchemaVersion = SCHEMA_VERSION,
ShardingFactor = shardingFactor,
ShardingFactor = SHARDING_FACTOR,
TelemetryEnabled = true
});

for (int i = 0; i < Connections.Count; i++)
Connections.AsParallel().ForAll(cxn =>
{
var cxn = Connections[i];
using (var innerCmd = new SqliteCommand(SQL_CREATE_COLLECT_RESULTS, cxn.Connection, cxn.Transaction))
{
innerCmd.ExecuteNonQuery();
Expand All @@ -222,7 +221,8 @@ public static bool Setup(string filename = null, int shardingFactor = 1, int flu
innerCmd.CommandText = SQL_CREATE_COLLECT_RUN_KEY_IDENTITY_COMBINED_INDEX;
innerCmd.ExecuteNonQuery();
}
}
});

}
catch (SqliteException e) {
Log.Debug(e,"Failed to set up fresh database.");
Expand Down

0 comments on commit 7d64b6f

Please sign in to comment.