Skip to content

Commit

Permalink
chore: words
Browse files Browse the repository at this point in the history
  • Loading branch information
rperryng committed Jan 11, 2023
1 parent b799a1b commit eee61ca
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ them at all!

### `on_start`

Call this hook if you are running `GraphQL::Hive` in a process that becomes
`forked` - for example a puma web server in its ["clustered
mode"](https://github.com/puma/puma/tree/6d8b728b42a61bcf3c1e4c698c9165a45e6071e8#clustered-mode),
Call this hook if you are running `GraphQL::Hive` in a process that `fork`s
itself.

example: `puma` web server running in (["clustered
mode"](https://github.com/puma/puma/tree/6d8b728b42a61bcf3c1e4c698c9165a45e6071e8#clustered-mode))

```ruby
# config/puma.rb
Expand All @@ -87,10 +89,13 @@ end
### `on_exit`

If your GraphQL API process is shut down non-gracefully but has a shutdown hook
to call into (like `puma` does when running in its clustered mode), call
`on_worker_exit`
to call into, call `on_worker_exit`.

`puma` example:

```ruby
# config/puma.rb

on_worker_shutdown do
GraphQL::Hive.instance.on_exit
end
Expand Down

0 comments on commit eee61ca

Please sign in to comment.