Skip to content

Commit 6e63f27

Browse files
authored
Merge pull request #95 from mahmednabil109/main
fix(xcontext): api_method should be a Field
2 parents a37c87a + 050d744 commit 6e63f27

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docker/mysql/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mysql:8.0
1+
FROM mysql:8.0-debian
22

33
# Configure golang environment to run migration against database
44
ARG TARGETARCH

pkg/api/api.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func (a *API) Start(ctx xcontext.Context, requestor EventRequestor, jobDescripto
167167
ev := &Event{
168168
// To allow jobs to finish we do not allow passing cancel and pause
169169
// signals to the job's context (therefore: xcontext.WithResetSignalers).
170-
Context: xcontext.WithResetSignalers(ctx).WithTag("api_method", "start"),
170+
Context: xcontext.WithResetSignalers(ctx).WithField("api_method", "start"),
171171
Type: EventTypeStart,
172172
ServerID: resp.ServerID,
173173
Msg: EventStartMsg{
@@ -191,7 +191,7 @@ func (a *API) Start(ctx xcontext.Context, requestor EventRequestor, jobDescripto
191191
func (a *API) Stop(ctx xcontext.Context, requestor EventRequestor, jobID types.JobID) (Response, error) {
192192
resp := a.newResponse(ResponseTypeStop)
193193
ev := &Event{
194-
Context: ctx.WithTag("api_method", "stop"),
194+
Context: ctx.WithField("api_method", "stop"),
195195
Type: EventTypeStop,
196196
ServerID: resp.ServerID,
197197
Msg: EventStopMsg{
@@ -214,7 +214,7 @@ func (a *API) Stop(ctx xcontext.Context, requestor EventRequestor, jobID types.J
214214
func (a *API) Status(ctx xcontext.Context, requestor EventRequestor, jobID types.JobID) (Response, error) {
215215
resp := a.newResponse(ResponseTypeStatus)
216216
ev := &Event{
217-
Context: ctx.WithTag("api_method", "status"),
217+
Context: ctx.WithField("api_method", "status"),
218218
Type: EventTypeStatus,
219219
ServerID: resp.ServerID,
220220
Msg: EventStatusMsg{
@@ -239,7 +239,7 @@ func (a *API) Status(ctx xcontext.Context, requestor EventRequestor, jobID types
239239
func (a *API) Retry(ctx xcontext.Context, requestor EventRequestor, jobID types.JobID) (Response, error) {
240240
resp := a.newResponse(ResponseTypeRetry)
241241
ev := &Event{
242-
Context: ctx.WithTag("api_method", "retry"),
242+
Context: ctx.WithField("api_method", "retry"),
243243
Type: EventTypeRetry,
244244
ServerID: resp.ServerID,
245245
Msg: EventRetryMsg{
@@ -266,7 +266,7 @@ func (a *API) Retry(ctx xcontext.Context, requestor EventRequestor, jobID types.
266266
func (a *API) List(ctx xcontext.Context, requestor EventRequestor, query *storage.JobQuery) (Response, error) {
267267
resp := a.newResponse(ResponseTypeList)
268268
ev := &Event{
269-
Context: ctx.WithTag("api_method", "list"),
269+
Context: ctx.WithField("api_method", "list"),
270270
Type: EventTypeList,
271271
ServerID: resp.ServerID,
272272
Msg: EventListMsg{

0 commit comments

Comments
 (0)