server_loop_service
messageflux.server_loop_service
LoopMetrics
a class that holds metrics for a single server loop
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
loop_duration |
float
|
the duration (in seconds) that it took the loop to run |
required |
exception |
Optional[Exception]
|
the exception (if any) that the loop raised |
None
|
ServerLoopService
Bases: BaseService
this is a base class for services that uses a 'loop' as their running method
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
duration_after_loop_success |
float
|
the duration (in seconds) to wait after successful run of the loop. |
0
|
duration_after_loop_failure |
float
|
the duration (in seconds) to wait after failed run of the loop. |
0
|
**kwargs |
the init args for base classes |
{}
|