[Openstack] [TaskFlow] Is there any way to retrieve the `flow_uuid` in the `Task`?

Timon Wong timon86.wang at gmail.com
Thu May 22 06:17:39 UTC 2014


For logging purpose, I wanna log the `flow_uuid` as a context to
indicate which flow the logging message related to.

Currently, I just created a logging adapter, grab the `uuid` from the
`flow_details`, the pass them as a constructor param like this:

flow = linear_flow.Flow(flow_name)
flow_detail = p_utils.create_flow_detail(flow)
logger = create_logger_adpater(flow_detail.uuid)
flow.add(XXXTask(logger), YYYTask(logger),ZZZTask(logger))


Is there any better way to do that?

Thanks in advance!

Regards,
Timon Wong




More information about the Openstack mailing list