|
|
|
@ -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 { |
|
|
|
|