forked from fabric8-analytics/fabric8-analytics-worker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bayesianFlow.yml
69 lines (67 loc) · 2.06 KB
/
bayesianFlow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
flow-definitions:
- &bayesianFlow
name: 'bayesianFlow'
queue: '{DEPLOYMENT_PREFIX}_ingestion_bayesianFlow_v0'
# propagate arguments to sub-flows
propagate_node_args: true
# propagate arguments from InitAnalysisFlow to bayesianAnalysisFlow
node_args_from_first: true
nowait:
- 'GraphImporterTask'
sampling:
name: 'constant'
args:
# check for flow state each 10 seconds
retry: 10
edges:
- from:
to: 'InitAnalysisFlow'
- from: 'InitAnalysisFlow'
to: 'bayesianAnalysisFlow'
condition: &shouldScheduleAnalysisCheck
# InitAnalysisFlow returns flow arguments or None if analysis was already done
# exclude metadata we store with each task result
name: 'fieldExist'
args:
key: 'ecosystem'
- from: 'InitAnalysisFlow'
to: 'GraphImporterTask'
condition:
and:
- not:
<<: *shouldScheduleAnalysisCheck
- name: 'argsFieldEqual'
args:
key: 'force_graph_sync'
value: true
- from: 'bayesianAnalysisFlow'
to: 'FinalizeTask'
- from: 'FinalizeTask'
to: 'ResultCollector'
condition:
name: 'envEqual'
args:
env: 'BAYESIAN_SYNC_S3'
value: '1'
- from: 'FinalizeTaskError'
to: 'ResultCollector'
condition:
name: 'envEqual'
args:
env: 'BAYESIAN_SYNC_S3'
value: '1'
- from: 'ResultCollector'
to: 'GraphImporterTask'
failures:
- nodes:
- 'bayesianAnalysisFlow'
fallback:
- 'FinalizeTaskError'
- <<: *bayesianFlow
name: 'bayesianApiFlow'
queue: '{DEPLOYMENT_PREFIX}_api_bayesianFlow_v0'
nowait: []
- <<: *bayesianFlow
name: 'bayesianPriorityFlow'
queue: '{DEPLOYMENT_PREFIX}_priority_bayesianFlow_v0'