-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix postgres statements case sensitivity #3007
Changes from all commits
9f5781e
dfc081d
a095249
9a6ea85
11504ad
ec51aa8
1b16dd6
1cc6977
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,24 @@ import ( | |
"fmt" | ||
"time" | ||
|
||
neosync_redis "github.com/nucleuscloud/neosync/worker/internal/redis" | ||
temporallogger "github.com/nucleuscloud/neosync/worker/internal/temporal-logger" | ||
redis "github.com/redis/go-redis/v9" | ||
"go.temporal.io/sdk/activity" | ||
"go.temporal.io/sdk/log" | ||
) | ||
|
||
type Activity struct { | ||
redisclient redis.UniversalClient | ||
} | ||
|
||
func New( | ||
redisclient redis.UniversalClient, | ||
) *Activity { | ||
return &Activity{ | ||
redisclient: redisclient, | ||
} | ||
} | ||
|
||
type DeleteRedisHashRequest struct { | ||
JobId string | ||
HashKey string | ||
|
@@ -20,7 +31,7 @@ type DeleteRedisHashRequest struct { | |
type DeleteRedisHashResponse struct { | ||
} | ||
|
||
func DeleteRedisHash( | ||
func (a *Activity) DeleteRedisHash( | ||
ctx context.Context, | ||
req *DeleteRedisHashRequest, | ||
) (*DeleteRedisHashResponse, error) { | ||
|
@@ -50,17 +61,16 @@ func DeleteRedisHash( | |
"RedisHashKey", req.HashKey, | ||
) | ||
|
||
// todo: this should be factored out of here and live on the activity itself | ||
redisClient, err := neosync_redis.GetRedisClient() | ||
if err != nil { | ||
return nil, err | ||
if a.redisclient == nil { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay so I'm guessing the way this works is that you are providing an empty redis client but the activity is never invoked via the workflow unless we detect redis clients, yes? |
||
return nil, fmt.Errorf("missing redis client. this operation requires redis.") | ||
} | ||
slogger.Debug("redis client created") | ||
slogger.Debug("redis client provided") | ||
|
||
err = deleteRedisHashByKey(ctx, redisClient, req.HashKey) | ||
err := deleteRedisHashByKey(ctx, a.redisclient, req.HashKey) | ||
if err != nil { | ||
return nil, err | ||
} | ||
slogger.Debug("deleted redis key") | ||
|
||
return &DeleteRedisHashResponse{}, nil | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
CREATE SCHEMA IF NOT EXISTS alltypes; | ||
CREATE SCHEMA IF NOT EXISTS "CaPiTaL"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DROP SCHEMA IF EXISTS alltypes CASCADE; | ||
DROP SCHEMA IF EXISTS "CaPiTaL" CASCADE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intentional?