Merge branch 'main' of https://git.innov.energy/Innovenergy/git_trunk
This commit is contained in:
commit
16597f950b
|
@ -14,6 +14,7 @@
|
||||||
<PackageReference Include="Microsoft.AspNet.Identity.Owin" Version="2.2.3" />
|
<PackageReference Include="Microsoft.AspNet.Identity.Owin" Version="2.2.3" />
|
||||||
<PackageReference Include="Microsoft.AspNet.WebApi.Core" Version="5.2.9" />
|
<PackageReference Include="Microsoft.AspNet.WebApi.Core" Version="5.2.9" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Identity.Web" Version="1.26.0" />
|
<PackageReference Include="Microsoft.Identity.Web" Version="1.26.0" />
|
||||||
<PackageReference Include="Microsoft.Owin.Cors" Version="4.2.2" />
|
<PackageReference Include="Microsoft.Owin.Cors" Version="4.2.2" />
|
||||||
|
|
|
@ -15,7 +15,6 @@ public class Installation : TreeNode
|
||||||
public Double Lat { get; set; }
|
public Double Lat { get; set; }
|
||||||
public Double Long { get; set; }
|
public Double Long { get; set; }
|
||||||
|
|
||||||
public String S3Bucket { get; set; } = "";
|
|
||||||
public String S3Region { get; set; } = "";
|
public String S3Region { get; set; } = "";
|
||||||
public String S3Provider { get; set; } = "";
|
public String S3Provider { get; set; } = "";
|
||||||
public String S3Key { get; set; } = "";
|
public String S3Key { get; set; } = "";
|
||||||
|
|
|
@ -13,6 +13,8 @@ public static class ExoCmd
|
||||||
{
|
{
|
||||||
//if (installation.Id != 1) return "help"; //Todo remove me I am for debugging
|
//if (installation.Id != 1) return "help"; //Todo remove me I am for debugging
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var preParse = await Exo
|
var preParse = await Exo
|
||||||
.WithArguments("iam access-key create " + installation.BucketName()
|
.WithArguments("iam access-key create " + installation.BucketName()
|
||||||
+ " --operation get-sos-object"
|
+ " --operation get-sos-object"
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
using System.Reactive.Concurrency;
|
using System.Reactive.Concurrency;
|
||||||
using System.Reactive.Linq;
|
using System.Reactive.Linq;
|
||||||
|
using CliWrap;
|
||||||
|
using CliWrap.Buffered;
|
||||||
using InnovEnergy.App.Backend.DataTypes;
|
using InnovEnergy.App.Backend.DataTypes;
|
||||||
using InnovEnergy.App.Backend.DataTypes.Methods;
|
using InnovEnergy.App.Backend.DataTypes.Methods;
|
||||||
using InnovEnergy.App.Backend.Relations;
|
using InnovEnergy.App.Backend.Relations;
|
||||||
|
@ -96,11 +98,22 @@ public static partial class Db
|
||||||
Sessions.Delete(s => s.LastSeen < deadline);
|
Sessions.Delete(s => s.LastSeen < deadline);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Task UpdateS3Urls()
|
private static async Task UpdateS3Urls()
|
||||||
{
|
{
|
||||||
return Installations
|
var bucketList = await Cli.Wrap("exo")
|
||||||
.Select(i => i.RenewS3BucketUrl())
|
.WithArguments("storage list -O json")
|
||||||
.WhenAll();
|
.ExecuteBufferedAsync();
|
||||||
|
|
||||||
|
|
||||||
|
var installationsToUpdate = Installations
|
||||||
|
.Select(i => i)
|
||||||
|
.Where(i => bucketList.StandardOutput.Contains("\"" + i.BucketName())).ToList()
|
||||||
|
;
|
||||||
|
|
||||||
|
foreach (var installation in installationsToUpdate)
|
||||||
|
{
|
||||||
|
await installation.RenewS3BucketUrl();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||||
|
"$SdkResolverGlobalJsonPath": "",
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"Backend": {
|
"Backend": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue