@haathie/pgmb 0.2.15 → 0.2.16

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": "@haathie/pgmb",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
4
4
  "description": "PG message broker, with a type-safe typescript client with built-in webhook & SSE support.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org",
@@ -130,6 +130,8 @@ RETURNS VOID AS $$
130
130
  $$ LANGUAGE sql VOLATILE PARALLEL UNSAFE SECURITY DEFINER
131
131
  SET search_path TO pgmb;
132
132
 
133
+ DROP FUNCTION IF EXISTS maintain_events_table(timestamptz);
134
+
133
135
  CREATE OR REPLACE PROCEDURE maintain_events_table(
134
136
  current_ts timestamptz DEFAULT NOW()
135
137
  ) AS $$
@@ -154,12 +156,10 @@ BEGIN
154
156
  RETURN;
155
157
  END IF;
156
158
 
157
- SELECT cron.schedule(
159
+ PERFORM cron.schedule(
158
160
  'pgmb_maintain_table_partitions',
159
161
  get_config_value('pg_cron_partition_maintenance_cron'),
160
162
  $CMD$ CALL pgmb.maintain_events_table(); $CMD$
161
163
  );
162
164
  END
163
165
  $$;
164
-
165
- DROP FUNCTION IF EXISTS maintain_events_table(timestamptz);