mirror of
https://github.com/GrassrootsEconomics/cic-dw.git
synced 2024-12-22 02:47:32 +01:00
fixes: deepsource suggestions
This commit is contained in:
parent
f20f4ca22d
commit
7497d0cd41
@ -2,6 +2,7 @@ package syncer
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/georgysavva/scany/pgxscan"
|
||||
"github.com/hibiken/asynq"
|
||||
"github.com/rs/zerolog/log"
|
||||
@ -11,7 +12,7 @@ type tableCount struct {
|
||||
Count int `db:"count"`
|
||||
}
|
||||
|
||||
func (s *Syncer) CacheSyncer(ctx context.Context, t *asynq.Task) error {
|
||||
func (s *Syncer) CacheSyncer(ctx context.Context, _ *asynq.Task) error {
|
||||
_, err := s.db.Exec(ctx, s.queries["cache-syncer"])
|
||||
if err != nil {
|
||||
log.Err(err).Msg("cache syncer task failed")
|
||||
|
@ -16,7 +16,7 @@ type tokenCursor struct {
|
||||
CursorPos string `db:"cursor_pos"`
|
||||
}
|
||||
|
||||
func (s *Syncer) TokenSyncer(ctx context.Context, t *asynq.Task) error {
|
||||
func (s *Syncer) TokenSyncer(ctx context.Context, _ *asynq.Task) error {
|
||||
var lastCursor tokenCursor
|
||||
|
||||
if err := pgxscan.Get(ctx, s.db, &lastCursor, s.queries["cursor-pos"], 3); err != nil {
|
||||
|
@ -2,12 +2,13 @@ package syncer
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/georgysavva/scany/pgxscan"
|
||||
"github.com/hibiken/asynq"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
func (s *Syncer) UssdSyncer(ctx context.Context, t *asynq.Task) error {
|
||||
func (s *Syncer) UssdSyncer(ctx context.Context, _ *asynq.Task) error {
|
||||
_, err := s.db.Exec(ctx, s.queries["ussd-syncer"])
|
||||
if err != nil {
|
||||
log.Err(err).Msg("ussd syncer task failed")
|
||||
|
Loading…
Reference in New Issue
Block a user