diff options
Diffstat (limited to 'store/store.go')
-rw-r--r-- | store/store.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/store/store.go b/store/store.go index 0007f495e..062ed0fbd 100644 --- a/store/store.go +++ b/store/store.go @@ -48,7 +48,7 @@ type Store interface { Status() StatusStore FileInfo() FileInfoStore Reaction() ReactionStore - JobStatus() JobStatusStore + Job() JobStore MarkSystemRanUnitTests() Close() DropAllTables() @@ -168,6 +168,7 @@ type PostStore interface { GetPostsCreatedAt(channelId string, time int64) StoreChannel Overwrite(post *model.Post) StoreChannel GetPostsByIds(postIds []string) StoreChannel + GetPostsBatchForIndexing(startTime int64, limit int) StoreChannel } type UserStore interface { @@ -384,10 +385,14 @@ type ReactionStore interface { DeleteAllWithEmojiName(emojiName string) StoreChannel } -type JobStatusStore interface { - SaveOrUpdate(status *model.JobStatus) StoreChannel +type JobStore interface { + Save(job *model.Job) StoreChannel + UpdateOptimistically(job *model.Job, currentStatus string) StoreChannel + UpdateStatus(id string, status string) StoreChannel + UpdateStatusOptimistically(id string, currentStatus string, newStatus string) StoreChannel Get(id string) StoreChannel GetAllByType(jobType string) StoreChannel GetAllByTypePage(jobType string, offset int, limit int) StoreChannel + GetAllByStatus(status string) StoreChannel Delete(id string) StoreChannel } |