-
Notifications
You must be signed in to change notification settings - Fork 3
/
example.yaml
107 lines (90 loc) · 2.96 KB
/
example.yaml
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
state_machines:
user_lifecycle:
feeds:
- name: jacquard
url: http://localhost:1212/<label>
states:
- gate: start
triggers:
- interval: 1m
exit_condition: >
feeds.jacquard.has_redesigned_first_two_drip_emails is defined
next:
type: context
path: feeds.jacquard.has_redesigned_first_two_drip_emails
default: send_welcome_email
destinations:
- value: true
state: send_welcome_email_test
- action: send_welcome_email
webhook: '{placeholders.api_root}/user-emails/send_welcome_email'
next:
type: constant
state: generate_first_recs
- action: send_welcome_email_test
webhook: '{placeholders.api_root}/user-emails/send_welcome_email_test'
next:
type: constant
state: generate_first_recs
- action: generate_first_recs
webhook: '{placeholders.api_root}/user-emails/generate_first_recs'
next:
type: constant
state: wait_for_first_recs
- gate: wait_for_first_recs
triggers:
- metadata: metadata.recs.has_first_recommendations
exit_condition: >
metadata.recs.has_first_recommendations and
(feeds.jacquard.has_redesigned_first_two_drip_emails is defined)
next:
type: context
path: feeds.jacquard.has_redesigned_first_two_drip_emails
default: send_stylist_onboarding_email
destinations:
- value: true
state: send_stylist_onboarding_email_test
- action: send_stylist_onboarding_email
webhook: '{placeholders.api_root}/user-emails/send_stylist_onboarding_email'
next:
type: constant
state: wait_before_browse_email
- action: send_stylist_onboarding_email_test
webhook: '{placeholders.api_root}/user-emails/send_stylist_onboarding_email_test'
next:
type: constant
state: wait_before_browse_email
- gate: wait_before_browse_email
triggers:
- time: 18h30m
exit_condition: >
12h has passed since history.entered_state
next:
type: constant
state: send_browse_email
- action: send_browse_email
webhook: '{placeholders.api_root}/user-emails/send_browse_email'
next:
type: constant
state: end
- gate: end
exit_condition: false
plugins:
logging:
- class: routemaster.logging:PythonLogger
kwargs:
log_level: DEBUG
- class: routemaster_prometheus:PrometheusLogger
kwargs:
path: /metrics
- class: routemaster_statsd:StatsDLogger
kwargs:
host: localhost
port: 8125
tags:
environment: production
- class: routemaster_sentry:SentryLogger
kwargs:
dsn: https://xxxxxxx:[email protected]/xxxxxxx
placeholders:
api_root: https://www.thread.com/hooks