Skip to content

Commit 9e6bf02

Browse files
authored
#71 feat(release): release 1.0.7
#71 feat(release): release 1.0.7
2 parents f0642af + 4eed426 commit 9e6bf02

8 files changed

Lines changed: 49 additions & 60 deletions

File tree

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ linters: # All available linters list: <https://golangci-lint.run/usage/linters/
5757
- gocritic # The most opinionated Go source code linter
5858
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
5959
- goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
60-
- golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
60+
- revive
6161
- goprintffuncname # Checks that printf-like functions are named with `f` at the end
6262
- gosec # Inspects source code for security problems
6363
- gosimple # Linter for Go source code that specializes in simplifying a code

activity/activity_pool.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import (
1111
"github.com/spiral/roadrunner/v2/pkg/pool"
1212
rrWorker "github.com/spiral/roadrunner/v2/pkg/worker"
1313
"github.com/spiral/roadrunner/v2/plugins/server"
14+
"github.com/spiral/roadrunner/v2/utils"
1415
roadrunner_temporal "github.com/temporalio/roadrunner-temporal"
1516
"github.com/temporalio/roadrunner-temporal/client"
1617
rrt "github.com/temporalio/roadrunner-temporal/protocol"
17-
"github.com/temporalio/roadrunner-temporal/utils"
1818
"go.temporal.io/api/common/v1"
1919
"go.temporal.io/sdk/activity"
2020
"go.temporal.io/sdk/converter"
@@ -23,9 +23,9 @@ import (
2323
)
2424

2525
// RR_MODE env variable
26-
const RR_MODE = "RR_MODE" //nolint:golint,stylecheck
26+
const RR_MODE = "RR_MODE" //nolint:revive,stylecheck
2727
// RR_CODEC env variable
28-
const RR_CODEC = "RR_CODEC" //nolint:golint,stylecheck
28+
const RR_CODEC = "RR_CODEC" //nolint:revive,stylecheck
2929

3030
//
3131
const doNotCompleteOnReturn = "doNotCompleteOnReturn"
@@ -118,7 +118,7 @@ func (pool *activityPoolImpl) ActivityNames() []string {
118118
// ActivityNames returns list of all available activity names.
119119
func (pool *activityPoolImpl) GetActivityContext(taskToken []byte) (context.Context, error) {
120120
const op = errors.Op("activity_pool_get_activity_context")
121-
c, ok := pool.running.Load(utils.ToString(taskToken))
121+
c, ok := pool.running.Load(utils.AsString(taskToken))
122122
if !ok {
123123
return nil, errors.E(op, errors.Str("heartbeat on non running activity"))
124124
}
@@ -187,8 +187,8 @@ func (pool *activityPoolImpl) executeActivity(ctx context.Context, args *common.
187187
msg.Payloads.Payloads = append(msg.Payloads.Payloads, heartbeatDetails.Payloads...)
188188
}
189189

190-
pool.running.Store(utils.ToString(info.TaskToken), ctx)
191-
defer pool.running.Delete(utils.ToString(info.TaskToken))
190+
pool.running.Store(utils.AsString(info.TaskToken), ctx)
191+
defer pool.running.Delete(utils.AsString(info.TaskToken))
192192

193193
result, err := pool.codec.Execute(pool.wp, rrt.Context{TaskQueue: info.TaskQueue}, msg)
194194
if err != nil {

constants.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package roadrunner_temporal //nolint:golint,stylecheck
1+
package roadrunner_temporal //nolint:revive,stylecheck
22

33
const (
4-
// Main plugin name
4+
// RootPluginName ...
55
RootPluginName = "temporal"
66

77
// RRMode sets as RR_MODE env variable to let worker know about the mode to run.

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ require (
99
github.com/json-iterator/go v1.1.11
1010
github.com/pborman/uuid v1.2.1
1111
// SPIRAL ========
12-
github.com/spiral/endure v1.0.1
12+
github.com/spiral/endure v1.0.2
1313
github.com/spiral/errors v1.0.11
14-
github.com/spiral/roadrunner/v2 v2.2.1
14+
github.com/spiral/roadrunner/v2 v2.3.0
1515
// ===========
1616
github.com/stretchr/testify v1.7.0
1717
go.temporal.io/api v1.4.1-0.20210420220407-6f00f7f98373

go.sum

Lines changed: 33 additions & 34 deletions
Large diffs are not rendered by default.

protocol/json_codec.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/spiral/errors"
77
"github.com/spiral/roadrunner/v2/pkg/payload"
88
"github.com/spiral/roadrunner/v2/plugins/logger"
9-
"github.com/temporalio/roadrunner-temporal/utils"
9+
"github.com/spiral/roadrunner/v2/utils"
1010
"go.temporal.io/api/common/v1"
1111
"go.temporal.io/api/failure/v1"
1212
)
@@ -99,7 +99,7 @@ func (c *JSONCodec) Execute(e Endpoint, ctx Context, msg ...Message) ([]Message,
9999
}
100100

101101
if c.level >= DebugNormal {
102-
logMessage := utils.ToString(p.Body) + " " + utils.ToString(p.Context)
102+
logMessage := utils.AsString(p.Body) + " " + utils.AsString(p.Context)
103103
if c.level >= DebugHumanized {
104104
logMessage = color.GreenString(logMessage)
105105
}
@@ -118,7 +118,7 @@ func (c *JSONCodec) Execute(e Endpoint, ctx Context, msg ...Message) ([]Message,
118118
}
119119

120120
if c.level >= DebugNormal {
121-
logMessage := utils.ToString(out.Body)
121+
logMessage := utils.AsString(out.Body)
122122
if c.level >= DebugHumanized {
123123
logMessage = color.HiYellowString(logMessage)
124124
}

utils/toString.go

Lines changed: 0 additions & 10 deletions
This file was deleted.

workflow/worker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ import (
2222
)
2323

2424
// RR_MODE env variable key
25-
const RR_MODE = "RR_MODE" //nolint:golint,stylecheck
25+
const RR_MODE = "RR_MODE" //nolint:revive,stylecheck
2626

2727
// RR_CODEC env variable key
28-
const RR_CODEC = "RR_CODEC" //nolint:golint,stylecheck
28+
const RR_CODEC = "RR_CODEC" //nolint:revive,stylecheck
2929

3030
// Workflow pool
3131
type pool interface {

0 commit comments

Comments
 (0)