Skip to content

Commit

Permalink
remove appCheck WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
prostgles committed Jun 21, 2024
1 parent 118f726 commit 4cb15fb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/PubSubManager/initPubSubManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export async function initPubSubManager(this: PubSubManager): Promise<PubSubMana
`);

console.log("REMOVE app check disabled");
if (!this.appCheck && Math.random() < 12) {
if (!this.appCheck && Math.random() > 12) {

this.appCheck = setInterval(async () => {
let checkForStaleTriggers = "";
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prostgles-server",
"version": "4.2.74",
"version": "4.2.75",
"description": "",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
6 changes: 4 additions & 2 deletions tests/isomorphicQueries.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,12 @@ export const isomorphicQueries = async (db: DBOFullyTyped | DBHandlerClient, log
{ returnType: "rows" }
) as { tgname: string; enabled: boolean; }[];
}
await sub.unsubscribe();
let validTriggers = await getTableTriggers(table_name);
console.log("unsubscribe start")
await sub.unsubscribe();
console.log("unsubscribe end")
assert.equal(validTriggers.filter(t => t.enabled).length, 3, '3 Triggers should be enabled');
await db.sql?.(`DELETE FROM prostgles.app_triggers`, []); // WHERE table_name = $1
await db.sql?.(`DELETE FROM prostgles.app_triggers`, []);
validTriggers = await getTableTriggers(table_name);
assert.equal(validTriggers.length, 3, '3 Triggers should exist but be disabled');
assert.equal(validTriggers.filter(t => t.enabled).length, 0);
Expand Down
2 changes: 1 addition & 1 deletion tests/server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4cb15fb

Please sign in to comment.