Add the event service
This commit is contained in:
@@ -284,7 +284,7 @@ func (q *GeneralQueue) processNext(ctx context.Context, handler GeneralQueueHand
|
||||
}
|
||||
|
||||
// Enqueue adds a new job to the queue
|
||||
func (q *GeneralQueue) Enqueue(ctx context.Context, payload any, maxRetries int, userId int, groupId int) (*ent.GeneralQueue, error) {
|
||||
func (q *GeneralQueue) Enqueue(ctx context.Context, payload any, maxRetries int, userId int) (*ent.GeneralQueue, error) {
|
||||
now := time.Now()
|
||||
|
||||
payloadMap, err := StructToMap(payload)
|
||||
@@ -300,7 +300,8 @@ func (q *GeneralQueue) Enqueue(ctx context.Context, payload any, maxRetries int,
|
||||
SetNumberOfTries(0).
|
||||
SetMaxRetries(maxRetries).
|
||||
SetCreatedAt(now).
|
||||
SetUpdatedAt(now)
|
||||
SetUpdatedAt(now).
|
||||
SetUserID(userId)
|
||||
|
||||
job, err := create.Save(ctx)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user