reconcile and rep ids sorted

This commit is contained in:
Miloš Jovanović 2026-09-10 12:39:36 +02:00
parent ede7884b31
commit e0911df455
5 changed files with 112 additions and 12 deletions

View file

@ -25,6 +25,8 @@ type User struct {
// STClient is what the handler needs from the Solidarity Tech API.
type STClient interface {
GetUser(ctx context.Context, id int64) (*User, error)
ActiveAgent(ctx context.Context, userID int64) (int64, error)
AssignAgent(ctx context.Context, userID, agentID int64) error
}
// Store is what the handler needs from persistence.
@ -37,6 +39,8 @@ type Store interface {
SetLastSync(ts int64) error
RepsFor(chapterID int64, dept string) ([]int64, error)
EligibleMembers(chapterID int64, dept string) ([]int64, error)
LogSkip(runID, userID, existingAgent, wouldHaveAssigned int64) error
SetProgress(runID, lastUserID int64) error
}
// ErrLocked is returned by AcquireLock when a run is already in flight