To be able to use nornir in a job and use the job's logger to log to the console and database simultaneously
So that ...
I don't have to pass around the JobResult object to perform job logging in nornir tasks
I know this is done when...
I can create a job that calls a nornir task, passes in the job's self.logger that can be used by nornir's task_instance_completed to log to the database and console. This doesn't currently work because task_instance_completed runs in a separate thread that celery is not aware of so celery does not know which task to associate the log to (celery._state.get_current_task returns None)
Optional - Feature groups this request pertains to.
As ...
P.D. - Plugin Developer
I want ...
To be able to use nornir in a job and use the job's logger to log to the console and database simultaneously
So that ...
I don't have to pass around the JobResult object to perform job logging in nornir tasks
I know this is done when...
I can create a job that calls a nornir task, passes in the job's
self.logger
that can be used by nornir'stask_instance_completed
to log to the database and console. This doesn't currently work becausetask_instance_completed
runs in a separate thread that celery is not aware of so celery does not know which task to associate the log to (celery._state.get_current_task
returns None)Optional - Feature groups this request pertains to.
Database Changes
No response
External Dependencies
No response