pg-boss 11.0.3 → 11.0.4

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/manager.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pg-boss",
3
- "version": "11.0.3",
3
+ "version": "11.0.4",
4
4
  "description": "Queueing jobs in Postgres from Node.js like a boss",
5
5
  "main": "./src/index.js",
6
6
  "engines": {
package/src/manager.js CHANGED
@@ -637,11 +637,11 @@ class Manager extends EventEmitter {
637
637
  const { table, partition } = await this.getQueueCache(name)
638
638
 
639
639
  if (partition) {
640
- const sql = plans.deleteAllJobs(this.config.schema, table)
641
- await this.db.executeSql(sql, [name])
642
- } else {
643
640
  const sql = plans.truncateTable(this.config.schema, table)
644
641
  await this.db.executeSql(sql)
642
+ } else {
643
+ const sql = plans.deleteAllJobs(this.config.schema, table)
644
+ await this.db.executeSql(sql, [name])
645
645
  }
646
646
  }
647
647