Auto-pruning of syncshell, added metrics for pruning, return of count of users in fullgroupdto.
This commit is contained in:
@@ -11,6 +11,7 @@ public class MetricsAPI
|
||||
public const string CounterUsersRegisteredDeleted = "lightless_users_registered_deleted";
|
||||
public const string GaugeLightFinderConnections = "lightless_lightfinder_connections";
|
||||
public const string GaugeLightFinderGroups = "lightless_lightfinder_groups";
|
||||
public const string GaugeGroupAutoPrunesEnabled = "lightless_group_autoprunes_enabled";
|
||||
public const string GaugePairs = "lightless_pairs";
|
||||
public const string GaugePairsPaused = "lightless_pairs_paused";
|
||||
public const string GaugeFilesTotal = "lightless_files";
|
||||
|
||||
1327
LightlessSyncServer/LightlessSyncShared/Migrations/20251205205537_AddAutoPruneInGroup.Designer.cs
generated
Normal file
1327
LightlessSyncServer/LightlessSyncShared/Migrations/20251205205537_AddAutoPruneInGroup.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,40 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LightlessSyncServer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddAutoPruneInGroup : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "auto_prune_days",
|
||||
table: "groups",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "auto_prune_enabled",
|
||||
table: "groups",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "auto_prune_days",
|
||||
table: "groups");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "auto_prune_enabled",
|
||||
table: "groups");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -430,6 +430,14 @@ namespace LightlessSyncServer.Migrations
|
||||
.HasColumnType("character varying(50)")
|
||||
.HasColumnName("alias");
|
||||
|
||||
b.Property<int>("AutoPruneDays")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("auto_prune_days");
|
||||
|
||||
b.Property<bool>("AutoPruneEnabled")
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("auto_prune_enabled");
|
||||
|
||||
b.Property<DateTime>("CreatedDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
|
||||
@@ -12,6 +12,8 @@ public class Group
|
||||
[MaxLength(50)]
|
||||
public string Alias { get; set; }
|
||||
public GroupProfile? Profile { get; set; }
|
||||
public bool AutoPruneEnabled { get; set; } = false;
|
||||
public int AutoPruneDays { get; set; } = 0;
|
||||
public bool InvitesEnabled { get; set; }
|
||||
public string HashedPassword { get; set; }
|
||||
public bool PreferDisableSounds { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user