File tree Expand file tree Collapse file tree 5 files changed +13
-11
lines changed Expand file tree Collapse file tree 5 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,8 @@ jobs:
113
113
- name : golangci-lint
114
114
115
115
with :
116
- timeout : 10m
116
+ # Optional: golangci-lint command line arguments.
117
+ args : ' --timeout=10m'
117
118
118
119
unittest :
119
120
name : Unit Test
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ linters:
11
11
12
12
# - bodyclose # due to https://github.com/golangci/golangci-lint/issues/3086#issuecomment-1475232706
13
13
- containedctx
14
- - depguard
15
14
- dupl
16
15
- durationcheck
17
16
- errname
@@ -40,6 +39,8 @@ linters:
40
39
- usestdlibvars
41
40
- whitespace
42
41
- wsl
42
+ disable :
43
+ - depguard
43
44
44
45
linters-settings :
45
46
wsl :
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ package main
2
2
3
3
import (
4
4
"context"
5
- "github.com/nekomeowww/insights-bot/internal/services/smr"
6
5
"log"
7
6
"time"
8
7
@@ -19,6 +18,7 @@ import (
19
18
"github.com/nekomeowww/insights-bot/internal/services/autorecap"
20
19
"github.com/nekomeowww/insights-bot/internal/services/health"
21
20
"github.com/nekomeowww/insights-bot/internal/services/pprof"
21
+ "github.com/nekomeowww/insights-bot/internal/services/smr"
22
22
"github.com/nekomeowww/insights-bot/internal/thirdparty"
23
23
)
24
24
Original file line number Diff line number Diff line change @@ -3,9 +3,6 @@ package health
3
3
import (
4
4
"context"
5
5
"fmt"
6
- "github.com/nekomeowww/insights-bot/internal/services/smr"
7
- "github.com/nekomeowww/insights-bot/pkg/bots/discordbot"
8
- "github.com/nekomeowww/insights-bot/pkg/bots/slackbot"
9
6
"net"
10
7
"net/http"
11
8
"time"
@@ -15,6 +12,9 @@ import (
15
12
16
13
"github.com/nekomeowww/insights-bot/internal/services/autorecap"
17
14
"github.com/nekomeowww/insights-bot/internal/services/pprof"
15
+ "github.com/nekomeowww/insights-bot/internal/services/smr"
16
+ "github.com/nekomeowww/insights-bot/pkg/bots/discordbot"
17
+ "github.com/nekomeowww/insights-bot/pkg/bots/slackbot"
18
18
"github.com/nekomeowww/insights-bot/pkg/bots/tgbot"
19
19
"github.com/nekomeowww/insights-bot/pkg/logger"
20
20
)
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ package smr
3
3
import (
4
4
"context"
5
5
"errors"
6
+ "time"
7
+
6
8
"github.com/nekomeowww/insights-bot/internal/configs"
7
9
"github.com/nekomeowww/insights-bot/internal/datastore"
8
10
"github.com/nekomeowww/insights-bot/internal/models/smr"
@@ -14,7 +16,6 @@ import (
14
16
"github.com/redis/rueidis"
15
17
"github.com/samber/lo"
16
18
"go.uber.org/fx"
17
- "time"
18
19
)
19
20
20
21
func NewModules () fx.Option {
@@ -151,9 +152,8 @@ func (s *Service) stop() {
151
152
s .closeFunc ()
152
153
}
153
154
154
- func Run () func (s * Service ) error {
155
- return func (s * Service ) error {
156
- s .run ()
157
- return nil
155
+ func Run () func (s * Service ) {
156
+ return func (s * Service ) {
157
+ go s .run ()
158
158
}
159
159
}
You can’t perform that action at this time.
0 commit comments