Skip to content

Commit

Permalink
comment StopInvalidTokenHandlers
Browse files Browse the repository at this point in the history
  • Loading branch information
Moises Silva committed Feb 6, 2019
1 parent e309a3e commit d7cd32b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ If Pusher needs to connect to a PostgreSQL database in order to delete invalid t
* `PUSHER_INVALIDTOKEN_PG_POOLSIZE` - PostgreSQL connection pool size;
* `PUSHER_INVALIDTOKEN_PG_MAXRETRIES` - PostgreSQL connection max retries;
* `PUSHER_INVALIDTOKEN_PG_CONNECTIONTIMEOUT` - Timeout for trying to establish connection;
* `PUSHER_INVALIDTOKEN_PG_CHANSIZE` - Size of the channel to buffer the tokens to be deleted;

Other than that, there are a couple more configurations you can pass using environment variables:

Expand Down
3 changes: 3 additions & 0 deletions extensions/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ func handleInvalidToken(invalidTokenHandlers []interfaces.InvalidTokenHandler, t
}
}

// StopInvalidTokenHandlers stops the invalid token handlers
// For each handler, it waits its buffered queue to be completely empty and forces
// the termination after the given timeout
func StopInvalidTokenHandlers(
logger *log.Logger,
invalidTokenHandlers []interfaces.InvalidTokenHandler,
Expand Down

0 comments on commit d7cd32b

Please sign in to comment.