This commit is contained in:
2021-08-27 18:40:48 +00:00
parent 9cd6c677f9
commit 7a21ff6714

View File

@@ -390,10 +390,15 @@ namespace AyaNova.PlugIn.V8
progress.StartedImport();
progress.Append("Exporting data to AyaNova server @ " + util.ApiBaseUrl);
progress.Append(util.PRE_RELEASE_VERSION_STRING);
Exception ExceptionDuringMigrate = null;
try
{
progress.Op("Preparing to export....");
//MIGRATE MODE
progress.Append("Setting v8 Server State to 'Migrate Mode'");
await util.PostAsync("server-state", "{\"serverState\":\"MigrateMode\"}");
ResetUniqueUserNames();
ResetUniqueNames();
Allv8WarehouseIds.Clear();
@@ -409,18 +414,19 @@ namespace AyaNova.PlugIn.V8
//admin user (not exported but is there already)
V7ToV8IdMap.Add(User.AdministratorID, 1);
//MIGRATE MODE
progress.Append("Setting v8 Server State to 'Migrate Mode'");
await util.PostAsync("server-state", "{\"serverState\":\"MigrateMode\"}");
//ERASE DB
progress.Append("Erasing AyaNova 8 data");
//delay to allow migrate mode to take effect
//this is a result of pm's generating in a loop at server causing issues with erasure
//this delay should not need to be more time than it takes for a single PM to generate into a workorder
//as of this time it's the only slow thing affecting migrate mode settling in
await System.Threading.Tasks.Task.Delay(7000);
var a = await util.PostAsync("license/permanently-erase-all-data", "\"I understand\"");
//delay to allow event log to properly show erase as the first operation
// System.Threading.Thread.Sleep(2000);
//TAGS
progress.Op("Compiling tags");