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> {
108108 this . #recurringTasks = options . recurringTasks ;
109109 }
110110
111+ get graphileWorkerSchema ( ) {
112+ return this . #runnerOptions. schema ?? "graphile_worker" ;
113+ }
114+
111115 public async initialize ( ) : Promise < boolean > {
112116 if ( this . #runner) {
113117 return true ;
@@ -252,7 +256,7 @@ export class ZodWorker<TMessageCatalog extends MessageCatalogSchema> {
252256 tx : PrismaClientOrTransaction
253257 ) {
254258 const results = await tx . $queryRawUnsafe (
255- `SELECT * FROM graphile_worker .add_job(
259+ `SELECT * FROM ${ this . graphileWorkerSchema } .add_job(
256260 identifier => $1::text,
257261 payload => $2::json,
258262 queue_name => $3::text,
@@ -290,7 +294,7 @@ export class ZodWorker<TMessageCatalog extends MessageCatalogSchema> {
290294 async #removeJob( jobKey : string , tx : PrismaClientOrTransaction ) {
291295 try {
292296 const result = await tx . $queryRawUnsafe (
293- `SELECT * FROM graphile_worker .remove_job(
297+ `SELECT * FROM ${ this . graphileWorkerSchema } .remove_job(
294298 job_key => $1::text
295299 )` ,
296300 jobKey
You can’t perform that action at this time.
0 commit comments