save progress

This commit is contained in:
StellaOps Bot
2025-12-18 09:10:36 +02:00
parent b4235c134c
commit 28823a8960
169 changed files with 11995 additions and 449 deletions

View File

@@ -94,6 +94,17 @@ internal sealed class InMemoryRunRepository : IRunRepository
query = query.Where(run => run.CreatedAt > createdAfter);
}
if (options.Cursor is { } cursor)
{
query = options.SortAscending
? query.Where(run => run.CreatedAt > cursor.CreatedAt ||
(run.CreatedAt == cursor.CreatedAt &&
string.Compare(run.Id, cursor.RunId, StringComparison.Ordinal) > 0))
: query.Where(run => run.CreatedAt < cursor.CreatedAt ||
(run.CreatedAt == cursor.CreatedAt &&
string.Compare(run.Id, cursor.RunId, StringComparison.Ordinal) < 0));
}
query = options.SortAscending
? query.OrderBy(run => run.CreatedAt).ThenBy(run => run.Id, StringComparer.Ordinal)
: query.OrderByDescending(run => run.CreatedAt).ThenByDescending(run => run.Id, StringComparer.Ordinal);

View File

@@ -12,6 +12,7 @@ using StellaOps.Scheduler.ImpactIndex;
using StellaOps.Scheduler.Models;
using StellaOps.Scheduler.Storage.Postgres.Repositories;
using StellaOps.Scheduler.WebService.Auth;
using StellaOps.Scheduler.WebService.Schedules;
namespace StellaOps.Scheduler.WebService.Runs;