File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,10 @@ export class ZodWorker<TMessageCatalog extends MessageCatalogSchema> {
108
108
this . #recurringTasks = options . recurringTasks ;
109
109
}
110
110
111
+ get graphileWorkerSchema ( ) {
112
+ return this . #runnerOptions. schema ?? "graphile_worker" ;
113
+ }
114
+
111
115
public async initialize ( ) : Promise < boolean > {
112
116
if ( this . #runner) {
113
117
return true ;
@@ -252,7 +256,7 @@ export class ZodWorker<TMessageCatalog extends MessageCatalogSchema> {
252
256
tx : PrismaClientOrTransaction
253
257
) {
254
258
const results = await tx . $queryRawUnsafe (
255
- `SELECT * FROM graphile_worker .add_job(
259
+ `SELECT * FROM ${ this . graphileWorkerSchema } .add_job(
256
260
identifier => $1::text,
257
261
payload => $2::json,
258
262
queue_name => $3::text,
@@ -290,7 +294,7 @@ export class ZodWorker<TMessageCatalog extends MessageCatalogSchema> {
290
294
async #removeJob( jobKey : string , tx : PrismaClientOrTransaction ) {
291
295
try {
292
296
const result = await tx . $queryRawUnsafe (
293
- `SELECT * FROM graphile_worker .remove_job(
297
+ `SELECT * FROM ${ this . graphileWorkerSchema } .remove_job(
294
298
job_key => $1::text
295
299
)` ,
296
300
jobKey
You can’t perform that action at this time.
0 commit comments