MannemSolutions / PgQuartz

Cluster aware scheduler for PostgreSQL
GNU General Public License v3.0
3 stars 1 forks source link

go template for checking results #15

Closed sebasmannem closed 2 years ago

sebasmannem commented 2 years ago

Results are strings. This could be stdout or stderr of a job, but could also be result of a query. All could be an array of strings (stdout and stderr split by '\n\', and query results cols joined by '\t' which could be configurable). Furtermore, there is also a returncode (for shells). And checks could also reference result codes (or maybe even stdout_lines) of earlier steps. Therefore we could define a check as a go template much like ansible when using jinja2. Something like this: 'ERROR: ' not in currentstep.stdout_lines or steps.awesome1.rc == 13.

Together this makes less sense, but being able to check a returncode of a previous step could be an awesome way to skip steps when previous steps failed. And being able to decide that the step has either succeeded or has failed, depending on stdout_lines is very powerfull too.