emdb/cmd/api-service/job/job.go

30 lines
444 B
Go
Raw Normal View History

2023-12-30 09:19:53 +01:00
package job
import (
"time"
)
type JobStatus string
const (
JobStatusToDo JobStatus = "todo"
JobStatusDoing JobStatus = "doing"
JobStatusDone JobStatus = "done"
)
type Action string
const (
interval = 10 * time.Second
ActionRefreshIMDBReviews Action = "refresh-imdb-reviews"
ActionRefreshAllIMDBReviews Action = "refresh-all-imdb-reviews"
)
type Job struct {
ID int
MovieID string
Action Action
Status JobStatus
}