This commit is contained in:
2023-02-17 01:45:36 +00:00
parent e6aac1bd6b
commit 37fa6cec52
2 changed files with 31 additions and 5 deletions

View File

@@ -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<long>()}");
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<long>()}");
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<long>()}");
}
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"