Commit Graph

14 Commits

Author SHA1 Message Date
Fabio Manganiello a373091c64 Prevent duplicate hook runs.
Instead of being a list, the hooks in the hook processor should be
backed by by-name and by-value maps.

Don't insert a hook if its exact backing method has already been
inserted. This is actually very common when hooks are defined as Python
snippets imported in other scripts too.
2024-05-02 00:51:09 +00:00
Fabio Manganiello f9b0bc905e
Migrated websocket service.
The websocket service is no longer provided by a different service,
controlled by a different thread running on another port.

Instead, it's now exposed directly over Flask routes, using
WSGI+eventlet+simple_websocket.

Also, the SSL context options have been removed from `backend.http`, for
sake of simplicity. If you want to enable SSL, you can serve Platypush
through a reverse proxy like nginx.
2023-05-07 12:08:28 +02:00
Fabio Manganiello 2a78f81a7b Major LINT fixes 2021-04-05 00:58:44 +02:00
Fabio Manganiello 470f4a8fc9 Added disable_web_clients_notification on Event for events
generated with high throughput that shouldn't be propagated
to the connected websockets.
2019-12-22 19:38:01 +01:00
Fabio Manganiello c05fc9ee3f Added logic to propagate events to the websockets backend 2018-11-02 10:14:06 +00:00
Fabio Manganiello 2647bd3881 Implemented token verification over HTTP calls.
The token can be provided either:

* GET parameter (``?token=abc``)
* JSON payload request (``{..your_request.., "_token":"abc"})
* HTTP header (``X-Token: abc``)
* Basic HTTP auth (any username works, password: token)
2018-07-08 21:36:58 +02:00
Fabio Manganiello 72af7adb46 #51 first web panel iteration 2018-01-29 13:47:21 +01:00
Fabio Manganiello ac15e581ce Added last.fm scrobbler plugin, solves #21 2018-01-15 02:40:22 +01:00
Fabio Manganiello 2871583c75 Fixed events being triggered as priority even if they had no preset priority 2018-01-07 17:10:59 +01:00
Fabio Manganiello fa34b05c6c Priority-based algorithm for hooks, solves #41 2018-01-04 19:19:56 +01:00
Fabio Manganiello 2a192dacc1 References to Config static getters moved from the constructor declaration to the constructor body to prevent the default Config object to be initialized before the time and any config override to be ignored. This should also fix the tests, #33 2018-01-02 19:44:58 +01:00
Fabio Manganiello 5a92c0ac3b - Proper support for event arguments
- Better algorithm for event matching
- Added send_event support to pusher
2018-01-02 00:35:55 +01:00
Fabio Manganiello 6928e440bc Support for Flic button events 2017-12-24 13:15:37 +01:00
Fabio Manganiello 7b97a5b229 - #30 Implemented Google Assistant backend
- #21 Implemented events management
2017-12-24 01:10:48 +01:00