Commit Graph

4 Commits

Author SHA1 Message Date
Fabio Manganiello 37dcaba7a1
Refactored structure of main application and startup scripts.
The main application class has been moved from __init__ to the app
module.

__init__ will contain instead the relevant global variables and the
modules and objects exposed to external integrations - such as
`get_plugin` and `get_backend`, or the `main` itself.

This will make future integrations much easier - the global __init__
doesn't contain any business logic now, it can import anything without
fearing circular dependencies, and it can limit its exposed objects to
those that we want to expose to 3rd-party integrations and scripts.

It will also make it easier to extend the main entry point with
additional logic - such as a supervisor or an embedded Redis server.
2023-07-23 23:12:36 +02:00
Fabio Manganiello 36fdcf6963 - The context should be properly expanded also when calling a Python procedure
- Refactored the logic for executing a request and wrapping the response common to procedures, crons and event hook decorators into platypush.common.exec_wrapper

- Added mock getvalue() method to Logger to prevent PyCharm failures in the tests when sys.stdout is redirected to the Logger object
2021-02-27 20:27:36 +01:00
Fabio Manganiello 235ddc6c2d More robust logging system and options to disable stdout/stderr logging capture 2019-01-27 00:53:30 +01:00
Fabio Manganiello 5a1169d8b8 Wrapped stdout and stderr under the same application logger 2019-01-02 11:38:21 +00:00