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
@@ -4,6 +4,11 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"msp-admin-service/conf"
|
||||
"msp-admin-service/service/delete_old_audit_worker"
|
||||
"msp-admin-service/service/inactive_worker"
|
||||
"msp-admin-service/service/session_worker"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/txix-open/isp-kit/app"
|
||||
"github.com/txix-open/isp-kit/bgjobx"
|
||||
@@ -15,9 +20,6 @@ import (
|
||||
"github.com/txix-open/isp-kit/http/httpcli"
|
||||
"github.com/txix-open/isp-kit/http/httpclix"
|
||||
"github.com/txix-open/isp-kit/log"
|
||||
"msp-admin-service/conf"
|
||||
"msp-admin-service/service/delete_old_audit_worker"
|
||||
"msp-admin-service/service/inactive_worker"
|
||||
)
|
||||
|
||||
type Assembly struct {
|
||||
@@ -80,6 +82,10 @@ func (a *Assembly) ReceiveConfig(ctx context.Context, remoteConfig []byte) error
|
||||
if err != nil {
|
||||
a.logger.Fatal(ctx, errors.WithMessage(err, "seed inactive user worker"))
|
||||
}
|
||||
err = session_worker.EnqueueSeedJob(ctx, a.bgjobCli)
|
||||
if err != nil {
|
||||
a.logger.Fatal(ctx, errors.WithMessage(err, "seed expire session worker"))
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
+14
-6
@@ -4,12 +4,6 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/txix-open/isp-kit/bgjobx"
|
||||
"github.com/txix-open/isp-kit/db"
|
||||
"github.com/txix-open/isp-kit/grpc/endpoint"
|
||||
"github.com/txix-open/isp-kit/grpc/isp"
|
||||
"github.com/txix-open/isp-kit/http/httpcli"
|
||||
"github.com/txix-open/isp-kit/log"
|
||||
"msp-admin-service/conf"
|
||||
"msp-admin-service/controller"
|
||||
"msp-admin-service/repository"
|
||||
@@ -18,7 +12,15 @@ import (
|
||||
"msp-admin-service/service/delete_old_audit_worker"
|
||||
"msp-admin-service/service/inactive_worker"
|
||||
"msp-admin-service/service/secure"
|
||||
"msp-admin-service/service/session_worker"
|
||||
"msp-admin-service/transaction"
|
||||
|
||||
"github.com/txix-open/isp-kit/bgjobx"
|
||||
"github.com/txix-open/isp-kit/db"
|
||||
"github.com/txix-open/isp-kit/grpc/endpoint"
|
||||
"github.com/txix-open/isp-kit/grpc/isp"
|
||||
"github.com/txix-open/isp-kit/http/httpcli"
|
||||
"github.com/txix-open/isp-kit/log"
|
||||
)
|
||||
|
||||
type DB interface {
|
||||
@@ -117,6 +119,7 @@ func (l Locator) Config(
|
||||
l.logger,
|
||||
)
|
||||
deleteOldAuditWorker := delete_old_audit_worker.NewService(l.logger, auditRepo, cfg.Audit.AuditTTl)
|
||||
expireSessionWorker := session_worker.NewExpireSessionWorker(l.logger, txManager)
|
||||
|
||||
return Config{
|
||||
Handler: handler,
|
||||
@@ -130,6 +133,11 @@ func (l Locator) Config(
|
||||
Concurrency: 1,
|
||||
PollInterval: jobPollInterval,
|
||||
Handle: inactiveBlocker,
|
||||
}, {
|
||||
Queue: session_worker.QueueName,
|
||||
Concurrency: 1,
|
||||
PollInterval: jobPollInterval,
|
||||
Handle: expireSessionWorker,
|
||||
}},
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user