From 37fa6cec52a089666e54b61950ce877e5efb86f4 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 17 Feb 2023 01:45:36 +0000 Subject: [PATCH] --- server/biz/GlobalBizSettingsBiz.cs | 25 +++++++++++++++++++++---- todo.txt | 11 ++++++++++- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/server/biz/GlobalBizSettingsBiz.cs b/server/biz/GlobalBizSettingsBiz.cs index 4655e36..1d63f3c 100644 --- a/server/biz/GlobalBizSettingsBiz.cs +++ b/server/biz/GlobalBizSettingsBiz.cs @@ -463,6 +463,7 @@ namespace Sockeye.Biz catch (Newtonsoft.Json.JsonReaderException jre) { log.LogError(jre, $"Error parsing attachment check for case {g.CaseId}, response text was {responseText}"); + throw; } GZCaseBiz biz = GZCaseBiz.GetBiz(ct); @@ -504,10 +505,26 @@ namespace Sockeye.Biz { using (AyContext ct = ServiceProviderProvider.DBContext) { - res = await client.GetAsync($"{URL_ROCKFISH}api/license/{jLicenseListItem["id"].Value()}"); - responseText = await res.Content.ReadAsStringAsync(); - var jLicense = JObject.Parse(responseText); - log.LogInformation($"Importing license:{responseText}"); + JObject jLicense = null; + + try + { + + res = await client.GetAsync($"{URL_ROCKFISH}api/license/{jLicenseListItem["id"].Value()}"); + if (res.StatusCode == System.Net.HttpStatusCode.TooManyRequests) + { + await Task.Delay(Sockeye.Util.ServerBootConfig.FAILED_AUTH_DELAY); + res = await client.GetAsync($"{URL_ROCKFISH}api/license/{jLicenseListItem["id"].Value()}"); + } + responseText = await res.Content.ReadAsStringAsync(); + jLicense = JObject.Parse(responseText); + } + catch (Newtonsoft.Json.JsonReaderException jrex) + { + log.LogError(jrex, $"Error importing license, response text was:{responseText}"); + throw; + } + /* {"regTo":"PDI Technologies","customerName":"PDI Technologies","dtcreated":1672261044,"email":"jberkel@pdisoftware.com","code":"na","fetched":true,"dtfetched":1672262347,"fetchFrom":null, "key":"[KEY\n{\n \"Key\": {\n \"LicenseFormat\": \"8\",\n \"Id\": \"1672261044\",\n \"RegisteredTo\": \"PDI Technologies\",\n \"DBID\": \"R6U37uNUN2hSQideG6Gg+MqoQY8vuUeyHFI6Kv7VDsE=\",\n \"Perpetual\": true,\n \"LicenseExpiration\": \"5555-01-01T00:00:00\",\n \"MaintenanceExpiration\": \"2023-12-28T00:00:00\",\n \"Features\": [\n {\n \"Name\": \"ActiveInternalUsers\",\n \"Count\": 5\n }\n ]\n }\n}\nKEY]\n[SIGNATURE\nkzVs8GH0MSIfsR7ZYQ5x+5wdVDJqpfOYvTfBCx32Vs+zqP7h89uUKI17jTx5rMvkOYX40GyJt0pTWOzltljzf+MaoTzoSvTsSPkWtdVWv8ZGOXUUdaZhzMoTJGxTg0JHka/8S5tLkTiuct3x+voiLAKXuFCp9TSZo4+UnejB6U2Bp6MfdZxLtKVZ/1RLu/h4SnP8ZbczuwbQReB1z4k4IRwjh5GHnUUm6YqZg/04m1X9FEeKQZQfGZk/qZ788jONbLQb4CLnq0/ZmIteeocDDBz59TYaC9BHwHp73y8jyPfEugVfyH2AE0J8ZILiFiozYQ7meP5X4ZOmd1nhTA8MkA==\nSIGNATURE]\n" diff --git a/todo.txt b/todo.txt index 64b54b7..d03c9a6 100644 --- a/todo.txt +++ b/todo.txt @@ -1,5 +1,14 @@ TODO: +flip over from rockfish +create user john without rights to Users +change pw for superuser account and make it with 2fa +setup notification for john for new trialrequest +test trial request full flow +test v7 dummy sale +test a v7 fetch + + UNTESTED notifications on RAVEN trial request awaiting approval sub server create and track @@ -19,7 +28,7 @@ Re-test all of the above on ayanova.com server before flipping over from rockfis copy of all howto docs to sockeye somewhere or ensure they are still available before final flip over, will need them SERVER - +supersock supersock CLIENT