Comparing version 10.0.0-beta11 to 10.0.0-beta12
{ | ||
"name": "pg-boss", | ||
"version": "10.0.0-beta11", | ||
"version": "10.0.0-beta12", | ||
"description": "Queueing jobs in Postgres from Node.js like a boss", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
@@ -61,2 +61,3 @@ const assert = require('assert') | ||
this.unsubscribeCommand = plans.unsubscribe(config.schema) | ||
this.getQueuesCommand = plans.getQueues(config.schema) | ||
this.getQueuesForEventCommand = plans.getQueuesForEvent(config.schema) | ||
@@ -84,6 +85,7 @@ | ||
this.updateQueue, | ||
this.getQueue, | ||
this.deleteQueue, | ||
this.purgeQueue, | ||
this.getQueueSize, | ||
this.getQueue, | ||
this.getQueues, | ||
this.clearStorage, | ||
@@ -567,3 +569,3 @@ this.getJobById | ||
const sql = plans.createQueue(this.config.schema, name) | ||
const sql = plans.insertQueue(this.config.schema) | ||
@@ -584,2 +586,7 @@ const params = [ | ||
async getQueues () { | ||
const { rows } = await this.db.executeSql(this.getQueuesCommand) | ||
return rows | ||
} | ||
async updateQueue (name, options = {}) { | ||
@@ -586,0 +593,0 @@ assert(name, 'Missing queue name argument') |
@@ -45,3 +45,3 @@ const DEFAULT_SCHEMA = 'pgboss' | ||
countStates, | ||
createQueue, | ||
insertQueue, | ||
updateQueue, | ||
@@ -51,2 +51,3 @@ createPartition, | ||
deleteQueueRecords, | ||
getQueues, | ||
getQueueByName, | ||
@@ -221,3 +222,3 @@ getQueueSize, | ||
BEGIN | ||
EXECUTE format('DROP TABLE IF EXISTS %I', ${schema}.get_partition(queue_name)); | ||
EXECUTE format('DROP TABLE IF EXISTS ${schema}.%I', ${schema}.get_partition(queue_name)); | ||
END; | ||
@@ -295,3 +296,3 @@ $$ | ||
function createQueue (schema) { | ||
function insertQueue (schema) { | ||
return ` | ||
@@ -316,2 +317,6 @@ INSERT INTO ${schema}.queue (name, policy, retry_limit, retry_delay, retry_backoff, expire_seconds, retention_minutes, dead_letter) | ||
function getQueues (schema) { | ||
return `SELECT * FROM ${schema}.queue` | ||
} | ||
function getQueueByName (schema) { | ||
@@ -318,0 +323,0 @@ return `SELECT * FROM ${schema}.queue WHERE name = $1` |
@@ -373,2 +373,3 @@ import { EventEmitter } from 'events' | ||
getQueue(name: string): Promise<PgBoss.Queue | null>; | ||
getQueues(): Promise<[PgBoss.Queue]>; | ||
updateQueue(name: string, options?: PgBoss.QueueUpdateOptions): Promise<void>; | ||
@@ -375,0 +376,0 @@ deleteQueue(name: string): Promise<void>; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
96918
2632