Files
SocialPub/PrivaPub/Models/Jobs/Job.cs
T
thepraandClaude Opus 5.5 e0682fa868 A sender's digest of its followers here is compared and mended
FEP-8fcf, received. When a delivery's Collection-Synchronization header digests the sender's followers on PrivaPub
otherwise than the personas following it, a job reads the list the header names (on the sender's origin, signed by the
instance actor): a follow the list leaves out ends, only when the list is the one the digest describes; a request it
lists is taken as accepted; a persona it lists that follows nothing there sends Undo{Follow}, as Mastodon does. Each
claiming delivery is compared once.

Checked live (scenarios/followsync.sh, now 15 checks): PrivaPub ends a follow Mastodon lost and undoes one only
Mastodon remembered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
2026-10-06 07:46:46 +02:00

49 lines
959 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,
SynchronizeFollowing
}
public enum JobState
{
Pending,
Running,
Done,
Dead
}
}