Closed WilliamMcCumstie closed 5 years ago
Related to the SQL query is unpacking the data. Currently there is a standalone method shared_job_data_table
that is responsible for creating a table from the data. However this has created very tightly coupled code.
Instead the data should be unpacked in a different way. Possible store the num_passed_runs
on the job
object itself?
Regards less, this comment needs to be resolved: https://github.com/alces-software/adminware/pull/141#pullrequestreview-171509255
Currently there is a
job_data
object that is generated from anSQL
query. As the query contains an aggregate function, some of the data is not stored on theJob
model. This make passing the data around problematic as it needs to be unpacked.As a result, a lot of the resultant code needs to know the exact format of the
job_data
object. Instead this format should be abstracted behind an adaptation layer. This way changes in the query don't affect the rest if the code.See this commit for further details: https://github.com/alces-software/adminware/pull/124/commits/24954ca7c264ee9601c8ba28fb9f0c9e387c9718