line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package IO::Iron::IronMQ::Api; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
## no critic (Documentation::RequirePodAtEnd) |
4
|
|
|
|
|
|
|
## no critic (Documentation::RequirePodSections) |
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
48
|
use 5.010_000; |
|
3
|
|
|
|
|
10
|
|
7
|
3
|
|
|
3
|
|
16
|
use strict; |
|
3
|
|
|
|
|
20
|
|
|
3
|
|
|
|
|
67
|
|
8
|
3
|
|
|
3
|
|
14
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
74
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# Global Creator |
11
|
|
|
|
3
|
|
|
BEGIN { |
12
|
|
|
|
|
|
|
# No exports. |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# Global Destructor |
16
|
|
|
|
3
|
|
|
END { |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# ABSTRACT: IronMQ API reference for Perl Client Libraries! |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
our $VERSION = '0.13'; # VERSION: generated by DZP::OurPkgVersion |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub IRONMQ_CREATE_QUEUE { |
28
|
|
|
|
|
|
|
return { |
29
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_CREATE_QUEUE', |
30
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}', |
31
|
|
|
|
|
|
|
'action' => 'PUT', |
32
|
|
|
|
|
|
|
'return' => 'NONE', |
33
|
|
|
|
|
|
|
'retry' => 1, |
34
|
|
|
|
|
|
|
'require_body' => 1, |
35
|
|
|
|
|
|
|
'request_fields' => { 'message_timeout' => 1, 'message_expiration' => 1, 'type' => 1, 'push' => 1, 'dead_letter' => 1, }, |
36
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
37
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Created a message queue.', |
38
|
|
|
|
|
|
|
}; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub IRONMQ_GET_QUEUE_INFO { |
43
|
|
|
|
|
|
|
return { |
44
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_GET_QUEUE_INFO', |
45
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}', |
46
|
|
|
|
|
|
|
'action' => 'GET', |
47
|
|
|
|
|
|
|
'return' => 'HASH', |
48
|
|
|
|
|
|
|
'retry' => 1, |
49
|
|
|
|
|
|
|
'require_body' => 0, |
50
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
51
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Got info about a message queue.', |
52
|
|
|
|
|
|
|
}; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub IRONMQ_UPDATE_QUEUE { |
57
|
|
|
|
|
|
|
return { |
58
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_UPDATE_QUEUE', |
59
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}', |
60
|
|
|
|
|
|
|
'action' => 'PATCH', |
61
|
|
|
|
|
|
|
'return' => 'NONE', |
62
|
|
|
|
|
|
|
'retry' => 1, |
63
|
|
|
|
|
|
|
'require_body' => 1, |
64
|
|
|
|
|
|
|
'request_fields' => { 'subscribers' => 1, 'push_type' => 1, 'retries' => 1, 'retries_delay' => 1 }, |
65
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
66
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Updated a message queue.', |
67
|
|
|
|
|
|
|
}; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub IRONMQ_DELETE_QUEUE { |
72
|
|
|
|
|
|
|
return { |
73
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_DELETE_QUEUE', |
74
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}', |
75
|
|
|
|
|
|
|
'action' => 'DELETE', |
76
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
77
|
|
|
|
|
|
|
'retry' => 1, |
78
|
|
|
|
|
|
|
'require_body' => 0, |
79
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
80
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Deleted message queue.', |
81
|
|
|
|
|
|
|
}; |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
sub IRONMQ_LIST_QUEUES { |
86
|
|
|
|
|
|
|
return { |
87
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_LIST_QUEUES', |
88
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues', |
89
|
|
|
|
|
|
|
'action' => 'GET', |
90
|
|
|
|
|
|
|
'return' => 'HASH', |
91
|
|
|
|
|
|
|
'retry' => 0, |
92
|
|
|
|
|
|
|
'require_body' => 0, |
93
|
|
|
|
|
|
|
'url_params' => { 'per_page' => 1, 'previous' => 1, 'prefix' => 1, }, |
94
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1 }, |
95
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}). Listed queues.', |
96
|
|
|
|
|
|
|
}; |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
sub IRONMQ_ADD_SUBSCRIBERS_TO_A_MESSAGE_QUEUE { |
101
|
|
|
|
|
|
|
return { |
102
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_ADD_SUBSCRIBERS_TO_A_MESSAGE_QUEUE', |
103
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/subscribers', |
104
|
|
|
|
|
|
|
'action' => 'POST', |
105
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
106
|
|
|
|
|
|
|
'retry' => 1, |
107
|
|
|
|
|
|
|
'require_body' => 1, |
108
|
|
|
|
|
|
|
'request_fields' => { 'subscribers' => 1 }, |
109
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
110
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Updated a message queue by adding subscribers.', |
111
|
|
|
|
|
|
|
}; |
112
|
|
|
|
|
|
|
} |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
sub IRONMQ_DELETE_SUBSCRIBERS_FROM_A_MESSAGE_QUEUE { |
116
|
|
|
|
|
|
|
return { |
117
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_DELETE_SUBSCRIBERS_FROM_A_MESSAGE_QUEUE', |
118
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/subscribers', |
119
|
|
|
|
|
|
|
'action' => 'DELETE', |
120
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
121
|
|
|
|
|
|
|
'retry' => 1, |
122
|
|
|
|
|
|
|
'require_body' => 1, |
123
|
|
|
|
|
|
|
'request_fields' => { 'subscribers' => 1 }, |
124
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
125
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Updated a message queue by deleting subscribers.', |
126
|
|
|
|
|
|
|
}; |
127
|
|
|
|
|
|
|
} |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
# TODO Bug in documentation: href last '/' not needed. |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
sub IRONMQ_ADD_ALERTS_TO_A_QUEUE { |
133
|
|
|
|
|
|
|
return { |
134
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_ADD_ALERTS_TO_A_QUEUE', |
135
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/alerts', |
136
|
|
|
|
|
|
|
'action' => 'POST', |
137
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
138
|
|
|
|
|
|
|
'retry' => 1, |
139
|
|
|
|
|
|
|
'require_body' => 1, |
140
|
|
|
|
|
|
|
'request_fields' => { 'alerts' => 1 }, |
141
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
142
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Set alerts to the queue.', |
143
|
|
|
|
|
|
|
}; |
144
|
|
|
|
|
|
|
} |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
# TODO Bug in documentation: href last '/' not needed. |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
sub IRONMQ_REPLACE_ALERTS_ON_A_QUEUE { |
150
|
|
|
|
|
|
|
return { |
151
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_REPLACE_ALERTS_ON_A_QUEUE', |
152
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/alerts', |
153
|
|
|
|
|
|
|
'action' => 'PUT', |
154
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
155
|
|
|
|
|
|
|
'retry' => 1, |
156
|
|
|
|
|
|
|
'require_body' => 1, |
157
|
|
|
|
|
|
|
'request_fields' => { 'alerts' => 1 }, |
158
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
159
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Replaced alerts on the queue.', |
160
|
|
|
|
|
|
|
}; |
161
|
|
|
|
|
|
|
} |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
# TODO Bug in documentation: href last '/' not needed. |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
sub IRONMQ_REMOVE_ALERTS_FROM_A_QUEUE { |
167
|
|
|
|
|
|
|
return { |
168
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_REMOVE_ALERTS_FROM_A_QUEUE', |
169
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/alerts', |
170
|
|
|
|
|
|
|
'action' => 'DELETE', |
171
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
172
|
|
|
|
|
|
|
'retry' => 1, |
173
|
|
|
|
|
|
|
'require_body' => 1, |
174
|
|
|
|
|
|
|
'request_fields' => { 'alerts' => 1 }, |
175
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
176
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Removed alerts from the queue.', |
177
|
|
|
|
|
|
|
}; |
178
|
|
|
|
|
|
|
} |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
sub IRONMQ_REMOVE_ALERTS_FROM_A_QUEUE_BY_ID { |
182
|
|
|
|
|
|
|
return { |
183
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_REMOVE_ALERTS_FROM_A_QUEUE_BY_ID', |
184
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/alerts/{Alert ID}', |
185
|
|
|
|
|
|
|
'action' => 'DELETE', |
186
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
187
|
|
|
|
|
|
|
'retry' => 1, |
188
|
|
|
|
|
|
|
'require_body' => 0, |
189
|
|
|
|
|
|
|
'request_fields' => { 'alerts' => 1 }, |
190
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1, '{Alert ID}' => 1, }, |
191
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}, alert_id={Alert ID}). Removed one alert from the queue.', |
192
|
|
|
|
|
|
|
}; |
193
|
|
|
|
|
|
|
} |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
sub IRONMQ_POST_MESSAGES { |
197
|
|
|
|
|
|
|
return { |
198
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_POST_MESSAGES', |
199
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/messages', |
200
|
|
|
|
|
|
|
'action' => 'POST', |
201
|
|
|
|
|
|
|
'return' => 'HASH', |
202
|
|
|
|
|
|
|
'retry' => 1, |
203
|
|
|
|
|
|
|
'require_body' => 1, |
204
|
|
|
|
|
|
|
'request_fields' => { 'messages' => 1 }, |
205
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
206
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Pushed messages to the queue.', |
207
|
|
|
|
|
|
|
}; |
208
|
|
|
|
|
|
|
} |
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
sub IRONMQ_RESERVE_MESSAGES { |
212
|
|
|
|
|
|
|
return { |
213
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_RESERVE_MESSAGES', |
214
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/reservations', |
215
|
|
|
|
|
|
|
'action' => 'POST', |
216
|
|
|
|
|
|
|
'return' => 'HASH', |
217
|
|
|
|
|
|
|
'retry' => 1, |
218
|
|
|
|
|
|
|
'require_body' => 1, |
219
|
|
|
|
|
|
|
'request_fields' => { 'n' => 1, 'timeout' => 1, 'wait' => 1, 'delete' => 1, }, |
220
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
221
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Reserved messages from the queue.', |
222
|
|
|
|
|
|
|
}; |
223
|
|
|
|
|
|
|
} |
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
sub IRONMQ_GET_MESSAGE_BY_ID { |
227
|
|
|
|
|
|
|
return { |
228
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_GET_MESSAGE_BY_ID', |
229
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/messages/{Message ID}', |
230
|
|
|
|
|
|
|
'action' => 'GET', |
231
|
|
|
|
|
|
|
'return' => 'HASH', |
232
|
|
|
|
|
|
|
'retry' => 1, |
233
|
|
|
|
|
|
|
'require_body' => 0, |
234
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1, '{Message ID}' => 1, }, |
235
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}, message_id={Message ID}). Got a message from the queue.', |
236
|
|
|
|
|
|
|
}; |
237
|
|
|
|
|
|
|
} |
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
sub IRONMQ_PEEK_MESSAGES { |
241
|
|
|
|
|
|
|
return { |
242
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_PEEK_MESSAGES', |
243
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/messages', |
244
|
|
|
|
|
|
|
'action' => 'GET', |
245
|
|
|
|
|
|
|
'return' => 'HASH', |
246
|
|
|
|
|
|
|
'retry' => 1, |
247
|
|
|
|
|
|
|
'require_body' => 0, |
248
|
|
|
|
|
|
|
'url_params' => { 'n' => 1, }, |
249
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1, }, |
250
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Peeked at messages on the queue.', |
251
|
|
|
|
|
|
|
}; |
252
|
|
|
|
|
|
|
} |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
sub IRONMQ_DELETE_MESSAGE { |
256
|
|
|
|
|
|
|
return { |
257
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_DELETE_MESSAGE', |
258
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/messages/{Message ID}', |
259
|
|
|
|
|
|
|
'action' => 'DELETE', |
260
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
261
|
|
|
|
|
|
|
'retry' => 1, |
262
|
|
|
|
|
|
|
'require_body' => 1, |
263
|
|
|
|
|
|
|
'request_fields' => { 'reservation_id' => 1, }, |
264
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1, '{Message ID}' => 1, }, |
265
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}, message_id={Message ID}). Deleted a message from the queue.', |
266
|
|
|
|
|
|
|
}; |
267
|
|
|
|
|
|
|
} |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
sub IRONMQ_DELETE_MESSAGES { |
271
|
|
|
|
|
|
|
return { |
272
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_DELETE_MESSAGES', |
273
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/messages', |
274
|
|
|
|
|
|
|
'action' => 'DELETE', |
275
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
276
|
|
|
|
|
|
|
'retry' => 1, |
277
|
|
|
|
|
|
|
'require_body' => 1, |
278
|
|
|
|
|
|
|
'request_fields' => { 'ids' => 1, }, |
279
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1, }, |
280
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Deleted messages from the queue.', |
281
|
|
|
|
|
|
|
}; |
282
|
|
|
|
|
|
|
} |
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
sub IRONMQ_TOUCH_MESSAGE { |
286
|
|
|
|
|
|
|
return { |
287
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_TOUCH_MESSAGE', |
288
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/messages/{Message ID}/touch', |
289
|
|
|
|
|
|
|
'action' => 'POST', |
290
|
|
|
|
|
|
|
'return' => 'HASH', |
291
|
|
|
|
|
|
|
'retry' => 1, |
292
|
|
|
|
|
|
|
'require_body' => 1, |
293
|
|
|
|
|
|
|
'request_fields' => { 'reservation_id' => 1, 'timeout' => 1, }, |
294
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1, '{Message ID}' => 1, }, |
295
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}, message_id={Message ID}). Touched a message on the queue.', |
296
|
|
|
|
|
|
|
}; |
297
|
|
|
|
|
|
|
} |
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
sub IRONMQ_RELEASE_MESSAGE { |
301
|
|
|
|
|
|
|
return { |
302
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_RELEASE_MESSAGE', |
303
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/messages/{Message ID}/release', |
304
|
|
|
|
|
|
|
'action' => 'POST', |
305
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
306
|
|
|
|
|
|
|
'retry' => 1, |
307
|
|
|
|
|
|
|
'require_body' => 1, |
308
|
|
|
|
|
|
|
'request_fields' => { 'reservation_id' => 1, 'delay' => 1, }, |
309
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1, '{Message ID}' => 1, }, |
310
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}, message_id={Message ID}). Released a message on the queue.', |
311
|
|
|
|
|
|
|
}; |
312
|
|
|
|
|
|
|
} |
313
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
sub IRONMQ_CLEAR_MESSAGES { |
316
|
|
|
|
|
|
|
return { |
317
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_CLEAR_MESSAGES', |
318
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/messages', |
319
|
|
|
|
|
|
|
'action' => 'DELETE', |
320
|
|
|
|
|
|
|
'return' => 'MESSAGE', |
321
|
|
|
|
|
|
|
'retry' => 1, |
322
|
|
|
|
|
|
|
'require_body' => 1, |
323
|
|
|
|
|
|
|
'request_fields' => {}, |
324
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1, }, |
325
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}). Cleared all messages from the queue.', |
326
|
|
|
|
|
|
|
}; |
327
|
|
|
|
|
|
|
} |
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
sub IRONMQ_GET_PUSH_STATUSES_FOR_A_MESSAGE { |
331
|
|
|
|
|
|
|
return { |
332
|
0
|
|
|
0
|
1
|
|
'action_name' => 'IRONMQ_GET_PUSH_STATUSES_FOR_A_MESSAGE', |
333
|
|
|
|
|
|
|
'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/queues/{Queue Name}/messages/{Message ID}/subscribers', |
334
|
|
|
|
|
|
|
'action' => 'GET', |
335
|
|
|
|
|
|
|
'return' => 'HASH', |
336
|
|
|
|
|
|
|
'retry' => 1, |
337
|
|
|
|
|
|
|
'require_body' => 0, |
338
|
|
|
|
|
|
|
'url_escape' => { '{Project ID}' => 1, '{Queue Name}' => 1 }, |
339
|
|
|
|
|
|
|
'log_message' => '(project={Project ID}, queue={Queue Name}, message_id={Message ID}). Got push status about a message.', |
340
|
|
|
|
|
|
|
}; |
341
|
|
|
|
|
|
|
} |
342
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
1; |
344
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
__END__ |