Skip to content

Commit

Permalink
docs: line buffering in Python
Browse files Browse the repository at this point in the history
  • Loading branch information
hoytech committed Sep 26, 2023
1 parent b3e5956 commit 3579f21
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ To install:

## Notes

* If applicable, you should ensure stdout is *line buffered* (for example, in perl use `$|++`).
* If applicable, you should ensure stdout is *line buffered*
* In perl use `$|++`
* In python, write with `print(response, flush=True)`
* If events are being rejected with `error: internal error`, then check the strfry logs. The plugin is misconfigured or failing.
* Normally when a plugin blocks an event, it will log a message. Especially when using plugins in `stream`, `router`, etc, this might be too verbose. In order to silence these logs, return an empty string for `msg` (or no `msg` at all).
* When returning an action of `accept`, it doesn't necessarily guarantee that the event will be accepted. The regular strfry checks are still subsequently applied, such as expiration, deletion, etc.

0 comments on commit 3579f21

Please sign in to comment.