From 3579f2142b5f8e2bbd86a4be1c2155f993b1dbd2 Mon Sep 17 00:00:00 2001 From: Doug Hoyte Date: Tue, 26 Sep 2023 16:30:13 -0400 Subject: [PATCH] docs: line buffering in Python --- docs/plugins.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/plugins.md b/docs/plugins.md index 2eb1d8e..12d8edb 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -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.