Browse Source

En cours de développement

master
losyme 2 months ago
parent
commit
2d76578f17
  1. 2
      internal/storage/mongo/jobs.go
  2. 1
      internal/storage/mongo/next.go

2
internal/storage/mongo/jobs.go

@ -76,7 +76,7 @@ func (ms *mongoStorage) InsertJob(job *jw.Job) (bool, error) {
}
func (ms *mongoStorage) UpdateJob(job *jw.Job) error {
return errors.NotImplemented()
return nil
}
func (ms *mongoStorage) NotifyJob(id string, data interface{}) error {

1
internal/storage/mongo/next.go

@ -61,6 +61,7 @@ func (ms *mongoStorage) NextJob(namespace string, fn storage.SelectNextJob) (*jw
ctx,
bson.M{
"namespace": namespace,
"run_after": bson.M{"$lt": time.Now()},
"$or": []bson.M{
{"status": jw.StatusTodo},
{"status": jw.StatusPending},

Loading…
Cancel
Save