mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:07:30 +00:00
chore(queue): use schema config instead of search_path
and application_name
to configure the database schema (#10075)
Removes manual schema and application name setup via raw SQL and switches to using River’s built-in schema configuration. # Which Problems Are Solved River provides a configuration flag to set the schema of the queue. Zitadel sets the schema through database statements which is not needed anymore. # How the Problems Are Solved Set the schema in the river configuration and removed old code
This commit is contained in:
@@ -41,6 +41,7 @@ func NewQueue(config *Config) (_ *Queue, err error) {
|
||||
Queues: make(map[string]river.QueueConfig),
|
||||
JobTimeout: -1,
|
||||
Middleware: middleware,
|
||||
Schema: schema,
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
@@ -56,7 +57,6 @@ func (q *Queue) Start(ctx context.Context) (err error) {
|
||||
if q == nil || !q.shouldStart {
|
||||
return nil
|
||||
}
|
||||
ctx = WithQueue(ctx)
|
||||
|
||||
q.client, err = river.NewClient(q.driver, q.config)
|
||||
if err != nil {
|
||||
@@ -112,7 +112,6 @@ func WithQueueName(name string) InsertOpt {
|
||||
|
||||
func (q *Queue) Insert(ctx context.Context, args river.JobArgs, opts ...InsertOpt) error {
|
||||
options := new(river.InsertOpts)
|
||||
ctx = WithQueue(ctx)
|
||||
for _, opt := range opts {
|
||||
opt(options)
|
||||
}
|
||||
|
Reference in New Issue
Block a user