This commit is contained in:
@@ -132,6 +132,14 @@ namespace Sockeye.Biz
|
||||
public async Task ImportRockfish(AyContext ct, ILogger log)
|
||||
{
|
||||
log.LogInformation("Start import from rockfish, authenticating");
|
||||
ApiServerState apiServerState = (ApiServerState)ServiceProviderProvider.Provider.GetService(typeof(ApiServerState));
|
||||
|
||||
//get the current server state so can set back to it later
|
||||
ApiServerState.ServerState wasServerState = apiServerState.GetState();
|
||||
string wasReason = apiServerState.Reason;
|
||||
apiServerState.SetOpsOnly("Migrating from Rockfish");
|
||||
ServerBootConfig.MIGRATING = true;
|
||||
|
||||
//Authenticate to rockfish
|
||||
//string sUrl = $"{LICENSE_SERVER_URL_ROCKFISH}rvr";
|
||||
string URL_ROCKFISH = "https://rockfish.ayanova.com/";
|
||||
@@ -766,6 +774,12 @@ namespace Sockeye.Biz
|
||||
var msg = "*** RockFish import FAILED ***";
|
||||
log.LogError(ex, msg);
|
||||
}
|
||||
finally
|
||||
{
|
||||
ServerBootConfig.MIGRATING = false;
|
||||
log.LogInformation($"Migrate Rockfish: setting server state back to {wasServerState.ToString()}");
|
||||
apiServerState.SetState(wasServerState, wasReason);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user