Browse Source

En cours de développement

master
losyme 2 months ago
parent
commit
6496c1bf64
  1. 7
      internal/storage/mongo/jobs.go

7
internal/storage/mongo/jobs.go

@ -81,7 +81,12 @@ func (ms *mongoStorage) InsertJob(job *jw.Job) (bool, error) {
}
func (ms *mongoStorage) UpdateJob(job *jw.Job) error {
return nil
col := ms.Collection("jobs")
ctx, cancel := util.CtxWithTimeout(5 * time.Second)
defer cancel()
return col.FindOneAndReplace(ctx, bson.M{"_id": job.ID}, job).Err()
}
func (ms *mongoStorage) NotifyJob(id string, data interface{}) error {

Loading…
Cancel
Save