pcuzner / ansible-runner-service

Python project that wraps the ansible_runner 'engine' inside a RESTful API
Other
17 stars 9 forks source link

add task and host info to the events list #10

Closed Daniel-Pivonka closed 6 years ago

Daniel-Pivonka commented 6 years ago

I improved the var names, made the output a list of dicts, and fixed the opening of the file twice.

Im working on figuring out how to get the status its not as simple as the other 2 fields,

and do you have any recommendations how to parallelize this?

Daniel-Pivonka commented 6 years ago

also this line https://github.com/pcuzner/ansible-runner-service/blob/768ab13cca1b94cad8d7c1d594b524950baa92fa/runner_service/services/jobs.py#L34 caused me errors. i commented it out for the time being as it doesnt seem to be doing anything

pcuzner commented 6 years ago

I'd look at the Queue module and introduce a producer/consumer model for reading the events to extract the information you need in parallel

pcuzner commented 6 years ago

As far as status goes, don't the tasks have an rc field? 0=successful? Maybe a question for ansible_runner forum?

Daniel-Pivonka commented 6 years ago

ive parallelized my process. limiting the number of threads to 10 for now. and ive added a status although i dont think the status is perfect but i want to know what you think?