2026-02-16 16:26:43: merge [main:5ee9d8568258a2e35dfce4aba80a607d007c2f0c];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
This commit is contained in:
1 parent
aebc53174b
commit
0ad3e3dead
41 files changed
+1378
-239
No files matched your search
@@ -0,0 +1,26 @@
|
||||
package session_worker
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/txix-open/bgjob"
|
||||
"github.com/txix-open/isp-kit/bgjobx"
|
||||
)
|
||||
|
||||
const (
|
||||
QueueName = "set_session_expired"
|
||||
)
|
||||
|
||||
func EnqueueSeedJob(ctx context.Context, client *bgjobx.Client) error {
|
||||
err := client.Enqueue(ctx, bgjob.EnqueueRequest{
|
||||
Id: "set_session_expired",
|
||||
Queue: QueueName,
|
||||
Type: "set_session_expired",
|
||||
})
|
||||
if err != nil && !errors.Is(err, bgjob.ErrJobAlreadyExist) {
|
||||
return errors.WithMessage(err, "enqueue job")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in new issue
Block a user