✨ Toy workflow addition
This commit is contained in:
21
example_workflow/job_output/job_FQQUQMTGtqUw/job.sh
Executable file
21
example_workflow/job_output/job_FQQUQMTGtqUw/job.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Get job params
|
||||
given_hash=$(grep 'file_hash: *' $(dirname $0)/job.yml | tail -n1 | cut -c 14-)
|
||||
event_path=$(grep 'event_path: *' $(dirname $0)/job.yml | tail -n1 | cut -c 15-)
|
||||
|
||||
echo event_path: $event_path
|
||||
echo given_hash: $given_hash
|
||||
|
||||
# Check hash of input file to avoid race conditions
|
||||
actual_hash=$(sha256sum $event_path | cut -c -64)
|
||||
echo actual_hash: $actual_hash
|
||||
if [ "$given_hash" != "$actual_hash" ]; then
|
||||
echo Job was skipped as triggering file has been modified since scheduling
|
||||
exit 134
|
||||
fi
|
||||
|
||||
# Call actual job script
|
||||
python3 job_queue/job_FQQUQMTGtqUw/recipe.py >>job_queue/job_FQQUQMTGtqUw/output.log 2>&1
|
||||
|
||||
exit $?
|
38
example_workflow/job_output/job_FQQUQMTGtqUw/job.yml
Normal file
38
example_workflow/job_output/job_FQQUQMTGtqUw/job.yml
Normal file
@ -0,0 +1,38 @@
|
||||
create: 2023-06-07 11:54:48.117191
|
||||
end: 2023-06-07 11:54:53.231092
|
||||
error: Job execution returned non-zero.
|
||||
event:
|
||||
event_path: /tmp/tmp3q4q94ee
|
||||
event_rule: !!python/object:meow_base.core.rule.Rule
|
||||
name: rule_xjGHQxaaray
|
||||
pattern: !!python/object:meow_base.patterns.network_event_pattern.NetworkEventPattern
|
||||
name: echo_pattern
|
||||
outputs: {}
|
||||
parameters: {}
|
||||
recipe: echo_recipe
|
||||
sweep: {}
|
||||
triggering_port: 8080
|
||||
recipe: !!python/object:meow_base.recipes.python_recipe.PythonRecipe
|
||||
name: echo_recipe
|
||||
parameters: {}
|
||||
recipe:
|
||||
- path = {PATH}
|
||||
- print(path)
|
||||
requirements: &id001 {}
|
||||
event_time: 1686131685.3071685
|
||||
event_type: network
|
||||
file_hash: f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
|
||||
monitor_base: ''
|
||||
triggering_port: 8080
|
||||
id: job_FQQUQMTGtqUw
|
||||
job_type: python
|
||||
parameters: {}
|
||||
pattern: echo_pattern
|
||||
recipe: echo_recipe
|
||||
requirements: *id001
|
||||
rule: rule_xjGHQxaaray
|
||||
start: 2023-06-07 11:54:53.168581
|
||||
status: failed
|
||||
tmp recipe command: python3 job_queue/job_FQQUQMTGtqUw/recipe.py >>job_queue/job_FQQUQMTGtqUw/output.log
|
||||
2>&1
|
||||
tmp script command: ./job.sh
|
2
example_workflow/job_output/job_FQQUQMTGtqUw/recipe.py
Executable file
2
example_workflow/job_output/job_FQQUQMTGtqUw/recipe.py
Executable file
@ -0,0 +1,2 @@
|
||||
path = {PATH}
|
||||
print(path)
|
Reference in New Issue
Block a user