Skip to content

Commit 5015046

Browse files
committed
chore: decrease the job group limit in session worker
1 parent d9dbc2e commit 5015046

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ require (
88
github.com/cosmos/cosmos-sdk v0.47.17
99
github.com/gin-contrib/cors v1.7.6
1010
github.com/gin-gonic/gin v1.11.0
11-
github.com/sentinel-official/sentinel-go-sdk v1.0.0
11+
github.com/sentinel-official/sentinel-go-sdk v1.0.1-0.20251028202929-21beb4dcafa5
1212
github.com/sentinel-official/sentinelhub/v12 v12.0.0
1313
github.com/spf13/cobra v1.10.1
1414
github.com/spf13/pflag v1.0.10

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,8 +576,8 @@ github.com/secure-io/siv-go v0.0.0-20180922214919-5ff40651e2c4 h1:zOjq+1/uLzn/Xo
576576
github.com/secure-io/siv-go v0.0.0-20180922214919-5ff40651e2c4/go.mod h1:aI+8yClBW+1uovkHw6HM01YXnYB8vohtB9C83wzx34E=
577577
github.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb h1:XfLJSPIOUX+osiMraVgIrMR27uMXnRJWGm1+GL8/63U=
578578
github.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb/go.mod h1:bR6DqgcAl1zTcOX8/pE2Qkj9XO00eCNqmKb7lXP8EAg=
579-
github.com/sentinel-official/sentinel-go-sdk v1.0.0 h1:7g/VibZlTWLZssRPJ9+9BWHuRBWvgBpBitP2nJ9lBQM=
580-
github.com/sentinel-official/sentinel-go-sdk v1.0.0/go.mod h1:N6mOoaBbrhiphJE8hk42lJZn0J1qZA+uVeOW6/tJfeY=
579+
github.com/sentinel-official/sentinel-go-sdk v1.0.1-0.20251028202929-21beb4dcafa5 h1:IYO60H1U9jQfpUYHieXmAL647FIPfgdrrS24wSy6b1M=
580+
github.com/sentinel-official/sentinel-go-sdk v1.0.1-0.20251028202929-21beb4dcafa5/go.mod h1:N6mOoaBbrhiphJE8hk42lJZn0J1qZA+uVeOW6/tJfeY=
581581
github.com/sentinel-official/sentinelhub/v12 v12.0.0 h1:Iw/6DnJllgSHR4beWdY95VpVNy0ZGESa3TcNrGAtBS8=
582582
github.com/sentinel-official/sentinelhub/v12 v12.0.0/go.mod h1:IuD4dlUOKvJVMTcNcbtQ+AlhTFkiRNXg2DuNlXGjYC8=
583583
github.com/shirou/gopsutil/v4 v4.25.9 h1:JImNpf6gCVhKgZhtaAHJ0serfFGtlfIlSC08eaKdTrU=

workers/session.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func NewSessionUsageSyncWithBlockchainWorker(c *core.Context, interval time.Dura
4848
)
4949

5050
jobGroup, jobCtx := errgroup.WithContext(ctx)
51-
jobGroup.SetLimit(8)
51+
jobGroup.SetLimit(2)
5252

5353
// Iterate over sessions and prepare messages for updates.
5454
for _, val := range items {
@@ -133,7 +133,7 @@ func NewSessionUsageSyncWithDatabaseWorker(c *core.Context, interval time.Durati
133133
}
134134

135135
jobGroup, jobCtx := errgroup.WithContext(ctx)
136-
jobGroup.SetLimit(8)
136+
jobGroup.SetLimit(2)
137137

138138
// Update the database with the fetched statistics.
139139
for key, val := range items {
@@ -214,7 +214,7 @@ func NewSessionUsageValidateWorker(c *core.Context, interval time.Duration) cron
214214
}
215215

216216
jobGroup, jobCtx := errgroup.WithContext(ctx)
217-
jobGroup.SetLimit(8)
217+
jobGroup.SetLimit(2)
218218

219219
// Validate session limits and remove peers if needed.
220220
for _, val := range items {
@@ -295,7 +295,7 @@ func NewSessionValidateWorker(c *core.Context, interval time.Duration) cron.Work
295295
}
296296

297297
jobGroup, jobCtx := errgroup.WithContext(ctx)
298-
jobGroup.SetLimit(8)
298+
jobGroup.SetLimit(2)
299299

300300
// Validate session status and consistency.
301301
for _, val := range items {

0 commit comments

Comments
 (0)