♻️ No idea what happended
This commit is contained in:
@@ -12,10 +12,7 @@ using Quartz;
|
||||
|
||||
namespace DysonNetwork.Sphere;
|
||||
|
||||
public class AppDatabase(
|
||||
DbContextOptions<AppDatabase> options,
|
||||
IConfiguration configuration
|
||||
) : DbContext(options)
|
||||
public class AppDatabase(DbContextOptions<AppDatabase> options, IConfiguration configuration) : DbContext(options)
|
||||
{
|
||||
public DbSet<CloudFile> Files { get; set; }
|
||||
public DbSet<CloudFileReference> FileReferences { get; set; }
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
<PackageReference Include="FFMpegCore" Version="5.2.0" />
|
||||
<PackageReference Include="HtmlAgilityPack" Version="1.12.1" />
|
||||
<PackageReference Include="Livekit.Server.Sdk.Dotnet" Version="1.0.8" />
|
||||
<PackageReference Include="MagicOnion.Abstractions" Version="7.0.5" />
|
||||
<PackageReference Include="MagicOnion.Client" Version="7.0.5" />
|
||||
<PackageReference Include="MagicOnion.Server" Version="7.0.5" />
|
||||
<PackageReference Include="Grpc.Net.Client" Version="2.71.0" />
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using DysonNetwork.Shared.Etcd;
|
||||
using DysonNetwork.Sphere;
|
||||
using DysonNetwork.Sphere.Startup;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
@@ -14,15 +15,16 @@ builder.ConfigureAppKestrel();
|
||||
// Add metrics and telemetry
|
||||
builder.Services.AddAppMetrics();
|
||||
|
||||
// Add remote services
|
||||
builder.Services.AddMagicOnion();
|
||||
builder.Services.AddEtcdService(builder.Configuration);
|
||||
|
||||
// Add application services
|
||||
builder.Services.AddAppServices(builder.Configuration);
|
||||
builder.Services.AddAppRateLimiting();
|
||||
builder.Services.AddAppAuthentication();
|
||||
builder.Services.AddAppSwagger();
|
||||
|
||||
// Add gRPC services
|
||||
builder.Services.AddGrpc();
|
||||
|
||||
// Configure MagicOnion client for IAccountService
|
||||
builder.Services.AddSingleton<IAccountService>(provider =>
|
||||
{
|
||||
@@ -86,8 +88,4 @@ var tusDiskStore = app.Services.GetRequiredService<TusDiskStore>();
|
||||
// Configure application middleware pipeline
|
||||
app.ConfigureAppMiddleware(builder.Configuration, tusDiskStore);
|
||||
|
||||
// Remove direct gRPC service mappings for Pass services
|
||||
// app.MapGrpcService<DysonNetwork.Pass.Auth.AuthGrpcService>();
|
||||
// app.MapGrpcService<DysonNetwork.Pass.Account.AccountGrpcService>();
|
||||
|
||||
app.Run();
|
||||
@@ -8,7 +8,8 @@
|
||||
"applicationUrl": "http://localhost:5071",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"workingDirectory": "/Users/littlesheep/Documents/Projects/DysonNetwork/DysonNetwork.Sphere"
|
||||
},
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
@@ -17,7 +18,8 @@
|
||||
"applicationUrl": "https://localhost:7099;http://localhost:5071",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"workingDirectory": "/Users/littlesheep/Documents/Projects/DysonNetwork/DysonNetwork.Sphere"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,14 +209,18 @@ public static class ServiceCollectionExtensions
|
||||
services.AddScoped<CustomAppService>();
|
||||
|
||||
// Add MagicOnion services
|
||||
services.AddMagicOnionService<IAccountService>();
|
||||
services.AddMagicOnionService<IAccountEventService>();
|
||||
services.AddMagicOnionService<IAccountUsernameService>();
|
||||
services.AddMagicOnionService<IActionLogService>();
|
||||
services.AddMagicOnionService<IMagicSpellService>();
|
||||
services.AddMagicOnionService<INotificationService>();
|
||||
services.AddMagicOnionService<IRelationshipService>();
|
||||
|
||||
services.AddRemoteService<IAccountService>();
|
||||
services.AddRemoteService<IAccountEventService>();
|
||||
services.AddRemoteService<IAccountProfileService>();
|
||||
services.AddRemoteService<IAccountUsernameService>();
|
||||
services.AddRemoteService<IActionLogService>();
|
||||
services.AddRemoteService<ICustomAppService>();
|
||||
services.AddRemoteService<IMagicSpellService>();
|
||||
services.AddRemoteService<INotificationService>();
|
||||
services.AddRemoteService<IPermissionService>();
|
||||
services.AddRemoteService<IPublisherService>();
|
||||
services.AddRemoteService<IRelationshipService>();
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ public class LastActiveInfo
|
||||
public Instant SeenAt { get; set; }
|
||||
}
|
||||
|
||||
public class LastActiveFlushHandler(DysonNetwork.Shared.Services.IAccountService accounts, DysonNetwork.Shared.Services.IAccountProfileService profiles) : IFlushHandler<LastActiveInfo>
|
||||
public class LastActiveFlushHandler(IAccountService accounts) : IFlushHandler<LastActiveInfo>
|
||||
{
|
||||
public async Task FlushAsync(IReadOnlyList<LastActiveInfo> items)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"App": "Host=localhost;Port=5432;Database=dyson_network;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60",
|
||||
"FastRetrieve": "localhost:6379"
|
||||
"FastRetrieve": "localhost:6379",
|
||||
"Etcd": "localhost:2379"
|
||||
},
|
||||
"Authentication": {
|
||||
"Schemes": {
|
||||
|
||||
Reference in New Issue
Block a user