mirror of
https://github.com/acaloiaro/neoq
synced 2026-07-21 10:12:18 +00:00
chore(deps): remove exp/slog in favor of log/slog
This commit is contained in:
parent
5aee2b2582
commit
2e0dd6b768
10 changed files with 9 additions and 16 deletions
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
|
@ -34,7 +34,7 @@ jobs:
|
|||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
|
||||
container: golang:1.21
|
||||
container: golang:1.24.0
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"os"
|
||||
"sync"
|
||||
"time"
|
||||
|
|
@ -17,7 +18,6 @@ import (
|
|||
"github.com/iancoleman/strcase"
|
||||
"github.com/jsuar/go-cron-descriptor/pkg/crondescriptor"
|
||||
"github.com/robfig/cron"
|
||||
"golang.org/x/exp/slog"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package memory_test
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
|
@ -18,7 +19,6 @@ import (
|
|||
"github.com/acaloiaro/neoq/testutils"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/robfig/cron"
|
||||
"golang.org/x/exp/slog"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -75,7 +75,7 @@ func TestBasicJobProcessing(t *testing.T) {
|
|||
},
|
||||
})
|
||||
if e != nil || jid == jobs.DuplicateJobID {
|
||||
slog.Error("job was not enqueued. either it was duplicate or this error caused it:", e)
|
||||
slog.Error("job was not enqueued. either it was duplicate or this error caused it:", "error", e)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
|
@ -149,7 +149,7 @@ func TestBackendConfiguration(t *testing.T) {
|
|||
},
|
||||
})
|
||||
if e != nil || jid == jobs.DuplicateJobID {
|
||||
slog.Error("job was not enqueued. either it was duplicate or this error caused it:", e)
|
||||
slog.Error("job was not enqueued. either it was duplicate or this error caused it:", "error", e)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1144,7 +1144,7 @@ func TestProcessPendingJobs(t *testing.T) {
|
|||
|
||||
ctx := context.Background()
|
||||
|
||||
nq, err := neoq.New(ctx, neoq.WithBackend(postgres.Backend), postgres.WithConnectionString(connString), neoq.WithPendingJobCheckInterval(time.Duration(50*time.Millisecond)))
|
||||
nq, err := neoq.New(ctx, neoq.WithBackend(postgres.Backend), postgres.WithConnectionString(connString), neoq.WithPendingJobCheckInterval(50*time.Millisecond))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
"log/slog"
|
||||
"os"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
|
@ -20,7 +21,6 @@ import (
|
|||
"github.com/hibiken/asynq"
|
||||
"github.com/iancoleman/strcase"
|
||||
"github.com/jsuar/go-cron-descriptor/pkg/crondescriptor"
|
||||
"golang.org/x/exp/slog"
|
||||
)
|
||||
|
||||
// All jobs are placed on the same 'default' queue (until a compelling case is made for using different asynq queues
|
||||
|
|
|
|||
1
go.mod
1
go.mod
|
|
@ -12,7 +12,6 @@ require (
|
|||
github.com/jsuar/go-cron-descriptor v0.1.0
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/robfig/cron v1.2.0
|
||||
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1
|
||||
)
|
||||
|
||||
require (
|
||||
|
|
|
|||
2
go.sum
2
go.sum
|
|
@ -157,8 +157,6 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh
|
|||
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
|
||||
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw=
|
||||
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
|
|
|
|||
|
|
@ -79,9 +79,6 @@ schema = 3
|
|||
[mod."golang.org/x/crypto"]
|
||||
version = "v0.31.0"
|
||||
hash = "sha256-ZBjoG7ZOuTEmjaXPP9txAvjAjC46DeaLs0zrNzi8EQw="
|
||||
[mod."golang.org/x/exp"]
|
||||
version = "v0.0.0-20230713183714-613f0c0eb8a1"
|
||||
hash = "sha256-VLE9CCOYpTdyBWaQ1YxXpGOBS74wpIR3JJ+JVzNyEkQ="
|
||||
[mod."golang.org/x/sync"]
|
||||
version = "v0.10.0"
|
||||
hash = "sha256-HWruKClrdoBKVdxKCyoazxeQV4dIYLdkHekQvx275/o="
|
||||
|
|
|
|||
|
|
@ -4,12 +4,11 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"runtime"
|
||||
"runtime/debug"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"golang.org/x/exp/slog"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package logging
|
||||
|
||||
import (
|
||||
"golang.org/x/exp/slog"
|
||||
"log/slog"
|
||||
)
|
||||
|
||||
// Logger interface is the interface that neoq's logger must implement
|
||||
|
|
|
|||
Loading…
Reference in a new issue