Adding dev-notes for try-catch block in periodic task
Not removing existing try-catch block for sync_bay_status and other periodic tasks. Rather leaving a note with the pointers and explanation for developers to add new periodic task. Change-Id: I2560d3961c19d73ab78a8e9812d69742c6bd2117 Closes-Bug:1496094
This commit is contained in:
parent
4f4d90376d
commit
ab5a173e6d
|
@ -49,6 +49,16 @@ class MagnumPeriodicTasks(periodic_task.PeriodicTasks):
|
|||
'''Magnum periodic Task class
|
||||
|
||||
Any periodic task job need to be added into this class
|
||||
|
||||
NOTE(suro-patz):
|
||||
- oslo_service.periodic_task runs tasks protected within try/catch
|
||||
block, with default raise_on_error as 'False', in run_periodic_tasks(),
|
||||
which ensures the process does not die, even if a task encounters an
|
||||
Exception.
|
||||
- The periodic tasks here does not necessarily need another
|
||||
try/catch block. The present try/catch block here helps putting
|
||||
magnum-periodic-task-specific log/error message.
|
||||
|
||||
'''
|
||||
|
||||
def __init__(self, conf, binary):
|
||||
|
|
Loading…
Reference in New Issue