prostgles-server 4.2.81 → 4.2.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prostgles-server",
3
- "version": "4.2.81",
3
+ "version": "4.2.82",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1023,13 +1023,26 @@ export const isomorphicQueries = async (db: DBOFullyTyped | DBHandlerClient, log
1023
1023
  await tryRunP("subscribe to escaped table name", async (resolve, reject) => {
1024
1024
  const filter = { [`"text_col0"`]: "0" }
1025
1025
  let runs = 0;
1026
+ setTimeout(() => {
1027
+ /** Used for debugging. Might not be necessary anymore */
1028
+ if(runs < 2){
1029
+ const appName = db.sql?.(`
1030
+ SELECT application_name
1031
+ FROM pg_catalog.pg_stat_activity
1032
+ WHERE pid = pg_backend_pid()
1033
+ `, [], { returnType: "rows" });
1034
+ const apps = db.sql?.(`SELECT * FROM prostgles.apps`, [], { returnType: "rows" });
1035
+ const app_triggers = db.sql?.(`SELECT * FROM prostgles.app_triggers`, [], { returnType: "rows" });
1036
+ log(JSON.stringify({appName, apps, app_triggers}));
1037
+ }
1038
+ }, 2000);
1026
1039
  const sub = await db[`"""quoted0"""`].subscribe!(filter, { }, async items => {
1027
1040
  const item = items[0];
1028
1041
  if(item && item[`"text_col0"`] === "0"){
1029
- if(!runs){
1042
+ runs++;
1043
+ if(runs === 1){
1030
1044
  db[`"""quoted0"""`].update!(filter, filter);
1031
1045
  }
1032
- runs++;
1033
1046
  if(runs < 2){
1034
1047
  return;
1035
1048
  }
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "../..": {
23
23
  "name": "prostgles-server",
24
- "version": "4.2.80",
24
+ "version": "4.2.81",
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
27
  "bluebird": "^3.7.2",