-
Notifications
You must be signed in to change notification settings - Fork 6
/
script.json
181 lines (181 loc) · 6.71 KB
/
script.json
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
{
"type":"object",
"properties":{
"script":{
"type":"object",
"properties":{
"callbacks":{
"type":"array" ,
"items":{
"type":"object",
"properties":{
"address":{
"type":"string",
"description":"For MSG callbacks, the mailbox address to use"
},
"delay":{
"type":"integer",
"description":"Seed for an initial random delay before first call, in millisecs. The actual delay is this value plus a random number in [0, 1000)"
},
"fire_once":{
"type":"boolean",
"description":"A flag specifying whether callbacks should be called at most once, even if the job is requeued and retraces previous states"
},
"method":{
"type":"string" ,
"enum":[
"DELETE", "delete", "put", "msg", "post", "MSG", "POST", "GET", "get", "PUT"
],
"default": "GET",
"description":"The HTTP method to use"
},
"order":{
"anyOf":[
{
"type":"null"
},
{
"type":"integer",
"minimum":0
}
],
"description":"Trigger ordering. Smaller (or nil) orders are triggered first, with progress callbacks taking preference over state callbacks. Synchronous and asynchronous callbacks are ordered independently. Callbacks with the same order, states and synchronicity are triggered in the order they are received."
},
"payload":{
"type":"object",
"description":"The payload to be used as a message body"
},
"progress_variation":{
"type":"number",
"exclusiveMinimum":0,
"exclusiveMaximum":1,
"description":"A number in (0, 1) which gives the variation in progress that will trigger this callback."
},
"register-address":{
"type":"boolean",
"description":"For MSG callbacks, whether to register the requested address if it does not yet exist (i.e., whether to create the associated message queue when the mailbox is RabbitMQ)"
},
"retries":{
"type":"integer",
"description":"Number of times the callback is retried on failures"
},
"retry_delay":{
"type":"integer",
"default": 1000,
"description":"Seed for a exponential back-off between retries, in millisecs"
},
"states":{
"type":"array" ,
"items":{
"type":"string"
},
"description":"A list of states for which the callback should be called. If not given, the callback will be called for either the given progress variation or, if that's not provided, for all state changes"
},
"synchronous":{
"type":"boolean",
"description":"A flag specifying wether the callback is synchronous and we need to wait for a remote response before proceeding"
},
"timeout":{
"type":"integer",
"default": 30000,
"description":"Lapse in millisecs waiting for the callback to get a response"
},
"url":{
"type":"string",
"description":"The URL to invoke with the method above"
}
},
"required":[
"url"
]
}
},
"imports":{
"type":"array" ,
"items":{
"type":"string"
},
"description":"List of the identifiers of libraries imported by this script."
},
"inputs":{
"type":"array" ,
"items":{
"type":"object",
"properties":{
"default":{
"type":"any",
"description":"Default value for the input during execution. Must match its type."
},
"name":{
"type":"string",
"description":"The input's name"
},
"type":{
"anyOf":[
{
"type":"string" ,
"enum":[
"list-of-map", "boolean", "map", "composite-id", "batchcentroid-id", "numeric", "list", "string", "batchprediction-id", "model-id", "list-of-integer", "projection-id", "resource-id", "list-of-string", "centroid-id", "project-id", "pca-id", "sample-id", "script-id", "source-id", "library-id", "list-of-boolean", "fusion-id", "list-of-number", "items", "forecast-id", "logisticregression-id", "text", "number", "evaluation-id", "optiml-id", "statisticaltest-id", "batchanomalyscore-id", "cluster-id", "function", "integer", "topicdistribution-id", "execution-id", "dataset-id", "configuration-id", "prediction-id", "timeseries-id", "anomaly-id", "anomalyscore-id", "categorical", "ensemble-id", "batchtopicdistribution-id", "correlation-id", "associationset-id", "batchprojection-id", "association-id", "supervised-model-id", "topicmodel-id", "deepnet-id"
]
},
{
"type":"array" ,
"items":{
"type":"any"
}
}
],
"description":"The input's data type"
}
},
"required":[
"name", "type"
]
},
"description":"A list of inputs, with names, types and defaults."
},
"name":{
"type":"string",
"description":"The script's name, set by the user."
},
"origin_id":{
"anyOf":[
{
"type":"string"
},
{
"type":"array" ,
"items":{
"type":"string"
}
}
],
"description":"The identifier of the script to be cloned, if any."
},
"outputs":{
"type":"array" ,
"items":{
"type":"object",
"properties":{
"name":{
"type":"string",
"description":"The output variable's name"
}
},
"required":[
"name"
]
},
"description":"List of output values, named by variable names defined in the script"
},
"source_code":{
"type":"string"
}
}
}
},
"required":[
"script"
],
"additionalProperties": false
}