Skip to content

Commit

Permalink
updated readme with event after-purge
Browse files Browse the repository at this point in the history
  • Loading branch information
ismael-iskauskas committed Jan 20, 2023
1 parent 75c65b1 commit ff2517b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/readme.md
Expand Up @@ -13,6 +13,7 @@
- [`monitor-states`](#monitor-states)
- [`wip`](#wip)
- [`stopped`](#stopped)
- [`after-purge`](#after-purge)
- [Static functions](#static-functions)
- [`string getConstructionPlans(schema)`](#string-getconstructionplansschema)
- [`string getMigrationPlans(schema, version)`](#string-getmigrationplansschema-version)
Expand Down Expand Up @@ -242,6 +243,17 @@ Emitted at most once every 2 seconds when workers are active and jobs are enteri

Emitted after `stop()` once all workers have completed their work and maintenance has been shut down.

## `after-purge`

Emitted after `purge()` gets called from the maintenance job. Only emitted if any archived job was deleted
```js
const boss = new PgBoss(....)
boss.on('after-purge', (jobIds) => {
console.log(jobIds) // ['fc738fb0-1de5-4947-b138-40d6a790749e']
})

```

# Static functions

The following static functions are not required during normal operations, but are intended to assist in schema creation or migration if run-time privileges do not allow schema changes.
Expand Down

0 comments on commit ff2517b

Please sign in to comment.