Consider the following points when configuring the ESPF:
- Enabling triggers on events causes additional load to the database;
- Each triggered event can be processed by more than one event handler. In this case, the event will be removed from the Event_Queue table only after the last handler processes it.
- To provision data to your external web application, configure and subscribe the event handler on the PortaBilling web interface.
- To ensure that your custom modifications remain on your servers during a software upgrade, list them in the Deposits page on the Configuration server web interface.
An example of a request processing script
Link copied to clipboard
Below is a 7-line script that was created using Flask (a python microframework). Execute the following command in Linux to install Flask using pip (a package management system used to install and manage software packages written in Python):
sudo pip install flask
The script receives requests with data from a handler and writes the data into the log file:
from flask import Flask, request app = Flask(__name__) @app.route('/test', methods=['POST', 'GET']) def test(): print(request.get_data()) return "<h1>OK</h1>" app.run(debug=True, port=3000, host="0.0.0.0")
Was this article helpful?