Compare commits

...

2 Commits

Author SHA1 Message Date
71e40b932c Merge pull request 'fix' (#4) from master into dev
Reviewed-on: #4
2024-12-31 02:55:33 +03:00
Egor Matveev
932f263373 fix
All checks were successful
Deploy Dev / Build (pull_request) Successful in 38s
Deploy Dev / Push (pull_request) Successful in 25s
Deploy Dev / Deploy dev (pull_request) Successful in 8s
2024-12-31 02:54:57 +03:00
2 changed files with 12 additions and 10 deletions

View File

@ -5,10 +5,12 @@ import (
"net/http"
tasks "queues-go/app/storage/mongo/collections"
"time"
"go.mongodb.org/mongo-driver/bson"
)
type PutRequestBody struct {
Payload json.RawMessage `json:"payload"`
Payload bson.M `json:"payload"`
SecondsToExecute int `json:"seconds_to_execute"`
Delay *int `json:"delay"`
}

View File

@ -24,7 +24,7 @@ type Task struct {
type InsertedTask struct {
Queue string `bson:"queue"`
Payload interface{} `bson:"payload"`
Payload bson.M `bson:"payload"`
PutAt time.Time `bson:"put_at"`
AvailableFrom time.Time `bson:"available_from"`
SecondsToExecute int `bson:"seconds_to_execute"`