|
|
|
|
@ -20,7 +20,8 @@ namespace Gremlin.GremlinData.DBClasses
|
|
|
|
|
internal static class DbHelper
|
|
|
|
|
{
|
|
|
|
|
private static readonly DateTime FarInTheFuture = DateTime.Parse("2050-12-31t00:00:00.000000z", CultureInfo.CurrentCulture);
|
|
|
|
|
private static readonly ParallelOptions parallelOptions = new() { MaxDegreeOfParallelism = Environment.ProcessorCount * 2 };
|
|
|
|
|
private static readonly ParallelOptions parallelOptions = new() { MaxDegreeOfParallelism = Environment.ProcessorCount * 4 };
|
|
|
|
|
private static readonly Random random = new();
|
|
|
|
|
|
|
|
|
|
public static bool CheckDatabaseConnection(string connectionString)
|
|
|
|
|
{
|
|
|
|
|
@ -1814,6 +1815,7 @@ namespace Gremlin.GremlinData.DBClasses
|
|
|
|
|
{
|
|
|
|
|
return await Task.Run(() => ImportCustomDescriptionsFromCsv());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static async Task<bool> UpdateProductsFromCsvAsync()
|
|
|
|
|
{
|
|
|
|
|
return await Task.Run(() => UpdateProductsFromCsv());
|
|
|
|
|
@ -1867,7 +1869,6 @@ namespace Gremlin.GremlinData.DBClasses
|
|
|
|
|
catch { return null; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static readonly Random random = new();
|
|
|
|
|
public static string RandomString(int length)
|
|
|
|
|
{
|
|
|
|
|
const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
|
|
|
|