RESTAPITracker#
top.restapi.tracker.RESTAPITracker class.
- class RESTAPITracker[source]#
Bases:
Tracker
REST API integration for getting active HTTP requests from a web server.
Get active and completed requests from the web server direclty.
You have a web server that itself can track its active requests and completed responses
The web server implements Top Framework REST API for fetching the tasks
Used with Node.js integration
Methods
__init__
(api_url, task_type[, api_key])Create a new emitter.
clear
()Clear the tracker from old/dangling tasks.
end_task
(task)Finish exisiting task.
Get currently active tasks.
Get the backlog of completed tasks.
start_task
(task)Start a new task.
- clear()[source]#
Clear the tracker from old/dangling tasks.
For example if the server has
Crashed
Restarted
Get rid of any stale data.
Can be called on the web server start.
- start_task(task)[source]#
Start a new task.
Record a task started in the tracker backend.
- Parameters:
task (Task) –