Once a follow holds, OutboxBackfill reads the account's latest public posts from its outbox's first page (twenty at most, once a day) and keeps them as any fetched post: its profile shows them at once instead of only what it posts from then on. Homes still get only what arrives afterwards, as on Mastodon. Announces and other servers' objects in the outbox are left out. Checked live against Mastodon (scenarios/pins.sh, now 9 checks). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
48 lines
935 B
C#
48 lines
935 B
C#
using MongoDB.Entities;
|
|
|
|
namespace PrivaPub.Models.Jobs
|
|
{
|
|
public class Job : Entity
|
|
{
|
|
public JobKind Kind { get; set; }
|
|
public JobState State { get; set; }
|
|
public string Payload { get; set; }
|
|
public string Host { get; set; }
|
|
public string DedupeKey { get; set; }
|
|
public int Attempts { get; set; }
|
|
public DateTime RunAt { get; set; } = DateTime.UtcNow;
|
|
public DateTime? LeasedUntil { get; set; }
|
|
public string LeaseOwner { get; set; }
|
|
public string LastError { get; set; }
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
public DateTime? FinishedAt { get; set; }
|
|
}
|
|
|
|
public enum JobKind
|
|
{
|
|
Deliver,
|
|
ProcessInbox,
|
|
FetchAncestors,
|
|
DescribeInstance,
|
|
PollRefresh,
|
|
PollClose,
|
|
FetchPreview,
|
|
RollupDay,
|
|
CrawlPlan,
|
|
CrawlInstance,
|
|
SendRecovery,
|
|
CountAccount,
|
|
PublishScheduled,
|
|
FetchReplies,
|
|
BackfillOutbox
|
|
}
|
|
|
|
public enum JobState
|
|
{
|
|
Pending,
|
|
Running,
|
|
Done,
|
|
Dead
|
|
}
|
|
}
|