Skip to content

Commit

Permalink
fix(authorization): error case in index builds for older environments
Browse files Browse the repository at this point in the history
  • Loading branch information
kkopanidis committed Feb 16, 2024
1 parent e02674c commit 88d4ddd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions modules/authorization/src/controllers/queue.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ export class QueueController {
ConduitGrpcSdk.Logger.error(`Job error:`);
ConduitGrpcSdk.Logger.error(error);
});

worker.on('failed', (job, error) => {
ConduitGrpcSdk.Logger.error(`Job error:`);
ConduitGrpcSdk.Logger.error(error);
});
}

addConnectionWorker() {
Expand Down Expand Up @@ -88,6 +93,10 @@ export class QueueController {
ConduitGrpcSdk.Logger.error(`Job error:`);
ConduitGrpcSdk.Logger.error(error);
});
worker.on('failed', (job, error) => {
ConduitGrpcSdk.Logger.error(`Job error:`);
ConduitGrpcSdk.Logger.error(error);
});
}

async addRelationIndexJob(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default async (job: SandboxedJob<ConstructRelationIndexWorkerData>) => {
permission,
connection.entity.split('#')[1],
connection.entity.split('#')[0],
[...connection.inheritanceTree, `${subject}#${relation}@${object}`],
[...(connection.inheritanceTree ?? []), `${subject}#${relation}@${object}`],
),
);
}
Expand Down

0 comments on commit 88d4ddd

Please sign in to comment.