allq_rest 1.5.2 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +36 -97
  3. data/lib/allq_rest/client.rb +168 -0
  4. data/lib/allq_rest/configuration.rb +7 -192
  5. data/lib/allq_rest/errors.rb +17 -0
  6. data/lib/allq_rest/job.rb +10 -0
  7. data/lib/allq_rest/version.rb +2 -14
  8. data/lib/allq_rest.rb +21 -46
  9. data/swagger.yaml +706 -0
  10. metadata +32 -116
  11. data/Gemfile +0 -7
  12. data/Gemfile.lock +0 -42
  13. data/Rakefile +0 -8
  14. data/allq_rest-1.2.92.gem +0 -0
  15. data/allq_rest-1.2.93.gem +0 -0
  16. data/allq_rest-1.3.0.gem +0 -0
  17. data/allq_rest-1.4.0.gem +0 -0
  18. data/allq_rest-1.5.0.gem +0 -0
  19. data/allq_rest-1.5.1.gem +0 -0
  20. data/allq_rest.gemspec +0 -28
  21. data/deploy.sh +0 -4
  22. data/docs/ActionsApi.md +0 -544
  23. data/docs/AdminApi.md +0 -98
  24. data/docs/BasicPayload.md +0 -11
  25. data/docs/BasicResponse.md +0 -8
  26. data/docs/JobRef.md +0 -8
  27. data/docs/JobResponse.md +0 -12
  28. data/docs/NewJob.md +0 -13
  29. data/docs/NewParentJob.md +0 -16
  30. data/docs/StatsInfo.md +0 -9
  31. data/docs/StatsResults.md +0 -10
  32. data/docs/StatsTube.md +0 -14
  33. data/docs/Throttle.md +0 -9
  34. data/docs/TubeRef.md +0 -8
  35. data/git_push.sh +0 -55
  36. data/lib/.DS_Store +0 -0
  37. data/lib/allq_rest/.DS_Store +0 -0
  38. data/lib/allq_rest/api/actions_api.rb +0 -763
  39. data/lib/allq_rest/api/admin_api.rb +0 -181
  40. data/lib/allq_rest/api_client.rb +0 -395
  41. data/lib/allq_rest/api_error.rb +0 -38
  42. data/lib/allq_rest/models/basic_payload.rb +0 -218
  43. data/lib/allq_rest/models/basic_response.rb +0 -188
  44. data/lib/allq_rest/models/job_ref.rb +0 -190
  45. data/lib/allq_rest/models/job_response.rb +0 -260
  46. data/lib/allq_rest/models/multiple_job_response.rb +0 -187
  47. data/lib/allq_rest/models/new_job.rb +0 -281
  48. data/lib/allq_rest/models/new_parent_job.rb +0 -312
  49. data/lib/allq_rest/models/stats_info.rb +0 -204
  50. data/lib/allq_rest/models/stats_results.rb +0 -254
  51. data/lib/allq_rest/models/stats_tube.rb +0 -306
  52. data/lib/allq_rest/models/throttle.rb +0 -209
  53. data/lib/allq_rest/models/tube_ref.rb +0 -190
  54. data/spec/.DS_Store +0 -0
  55. data/spec/api/actions_api_spec.rb +0 -600
  56. data/spec/api/admin_api_spec.rb +0 -58
  57. data/spec/api_client_spec.rb +0 -226
  58. data/spec/configuration_spec.rb +0 -42
  59. data/spec/models/basic_payload_spec.rb +0 -60
  60. data/spec/models/basic_response_spec.rb +0 -42
  61. data/spec/models/job_ref_spec.rb +0 -42
  62. data/spec/models/job_response_spec.rb +0 -66
  63. data/spec/models/new_job_spec.rb +0 -72
  64. data/spec/models/new_parent_job_spec.rb +0 -90
  65. data/spec/models/stats_info_spec.rb +0 -48
  66. data/spec/models/stats_results_spec.rb +0 -54
  67. data/spec/models/stats_tube_spec.rb +0 -78
  68. data/spec/models/throttle_spec.rb +0 -48
  69. data/spec/models/tube_ref_spec.rb +0 -42
  70. data/spec/spec_helper.rb +0 -113
data/swagger.yaml ADDED
@@ -0,0 +1,706 @@
1
+ swagger: '2.0'
2
+ info:
3
+ version: '1.0'
4
+ title: AllQ
5
+ description: ''
6
+ contact: {}
7
+ host: localhost:8090
8
+ basePath: /
9
+ schemes:
10
+ - http
11
+ consumes:
12
+ - application/json
13
+ produces:
14
+ - application/json
15
+ paths:
16
+ /drain:
17
+ put:
18
+ description: Drain Server
19
+ summary: Drain tube and delete it
20
+ tags:
21
+ - Admin
22
+ operationId: DrainServer
23
+ produces:
24
+ - application/json
25
+ parameters:
26
+ - name: server_id
27
+ in: query
28
+ required: true
29
+ type: string
30
+ description: Server URL or ID
31
+ responses:
32
+ 200:
33
+ description: ''
34
+ schema:
35
+ $ref: '#/definitions/BasicResponse'
36
+ /tube:
37
+ delete:
38
+ description: Delete all contents of tube
39
+ summary: Clear Tube
40
+ tags:
41
+ - Actions
42
+ operationId: TubeDelete
43
+ produces:
44
+ - application/json
45
+ parameters:
46
+ - name: tube
47
+ in: query
48
+ required: true
49
+ type: string
50
+ description: Tube Name
51
+ responses:
52
+ 200:
53
+ description: ''
54
+ schema:
55
+ $ref: '#/definitions/BasicResponse'
56
+ /bury:
57
+ put:
58
+ description: Bury Job
59
+ summary: Bury
60
+ tags:
61
+ - Actions
62
+ operationId: BuryPut
63
+ produces:
64
+ - application/json
65
+ parameters:
66
+ - name: job_id
67
+ in: query
68
+ required: true
69
+ type: string
70
+ description: Job ID
71
+ responses:
72
+ 200:
73
+ description: ''
74
+ schema:
75
+ $ref: '#/definitions/BasicResponse'
76
+ /kick:
77
+ put:
78
+ description: Kick Job
79
+ summary: Kicj
80
+ tags:
81
+ - Actions
82
+ operationId: KickPut
83
+ produces:
84
+ - application/json
85
+ parameters:
86
+ - name: tube
87
+ in: query
88
+ required: true
89
+ type: string
90
+ description: Tube name
91
+ responses:
92
+ 200:
93
+ description: ''
94
+ schema:
95
+ $ref: '#/definitions/BasicResponse'
96
+ /stats:
97
+ get:
98
+ description: Get Stats
99
+ summary: Stats
100
+ tags:
101
+ - Admin
102
+ operationId: StatsGet
103
+ produces:
104
+ - application/json
105
+ parameters: []
106
+ responses:
107
+ 200:
108
+ description: ''
109
+ schema:
110
+ type: array
111
+ items:
112
+ $ref: '#/definitions/StatsResults'
113
+ /multiple_job:
114
+ get:
115
+ description: Get multiple jobs from queue
116
+ summary: Multiple Job
117
+ tags:
118
+ - Actions
119
+ operationId: MultipleJobGet
120
+ produces:
121
+ - application/json
122
+ parameters:
123
+ - name: tube
124
+ in: query
125
+ required: true
126
+ type: string
127
+ description: Name of tube
128
+ - name: delete
129
+ in: query
130
+ required: false
131
+ type: string
132
+ description: Delete on get
133
+ - name: count
134
+ in: query
135
+ required: true
136
+ type: integer
137
+ description: Max number of reults
138
+ responses:
139
+ 200:
140
+ description: ''
141
+ schema:
142
+ $ref: '#/definitions/MultipleJobResponse'
143
+ /job:
144
+ get:
145
+ description: Get job from queue
146
+ summary: Job
147
+ tags:
148
+ - Actions
149
+ operationId: JobGet
150
+ produces:
151
+ - application/json
152
+ parameters:
153
+ - name: tube
154
+ in: query
155
+ required: true
156
+ type: string
157
+ description: Name of tube
158
+ - name: delete
159
+ in: query
160
+ required: false
161
+ type: string
162
+ description: Delete on get
163
+ responses:
164
+ 200:
165
+ description: ''
166
+ schema:
167
+ $ref: '#/definitions/JobResponse'
168
+ post:
169
+ description: Put job into queue
170
+ summary: Job
171
+ tags:
172
+ - Actions
173
+ operationId: JobPost
174
+ produces:
175
+ - application/json
176
+ parameters:
177
+ - name: new_job
178
+ in: body
179
+ required: true
180
+ description: New Job Object
181
+ schema:
182
+ $ref: '#/definitions/NewJob'
183
+ responses:
184
+ 200:
185
+ description: ''
186
+ schema:
187
+ $ref: '#/definitions/JobRef'
188
+ delete:
189
+ description: Finished Job
190
+ summary: Delete
191
+ tags:
192
+ - Actions
193
+ operationId: JobDelete
194
+ produces:
195
+ - application/json
196
+ parameters:
197
+ - name: job_id
198
+ in: query
199
+ required: true
200
+ type: string
201
+ description: Job ID
202
+ - name: tube
203
+ in: query
204
+ required: false
205
+ type: string
206
+ description: Name of Tube (For deleting "ready" objects)
207
+ responses:
208
+ 200:
209
+ description: ''
210
+ schema:
211
+ $ref: '#/definitions/BasicResponse'
212
+ /release:
213
+ put:
214
+ description: Releases job back into queue
215
+ summary: Release
216
+ tags:
217
+ - Actions
218
+ operationId: ReleasePut
219
+ produces:
220
+ - application/json
221
+ parameters:
222
+ - name: job_id
223
+ in: query
224
+ required: true
225
+ type: string
226
+ description: Job ID
227
+ - name: delay
228
+ in: query
229
+ required: false
230
+ type: integer
231
+ description: Delay for re-enqueue
232
+ responses:
233
+ 200:
234
+ description: ''
235
+ schema:
236
+ $ref: '#/definitions/BasicResponse'
237
+ /touch:
238
+ put:
239
+ description: Touch job
240
+ summary: Touch
241
+ tags:
242
+ - Actions
243
+ operationId: TouchPut
244
+ produces:
245
+ - application/json
246
+ parameters:
247
+ - name: job_id
248
+ in: query
249
+ required: true
250
+ type: string
251
+ description: Job ID
252
+ responses:
253
+ 200:
254
+ description: ''
255
+ schema:
256
+ $ref: '#/definitions/BasicResponse'
257
+ /parent_job:
258
+ post:
259
+ description: Create a parent job
260
+ summary: Parent Job
261
+ tags:
262
+ - Actions
263
+ operationId: ParentJobPost
264
+ produces:
265
+ - application/json
266
+ parameters:
267
+ - name: new_parent_job
268
+ in: body
269
+ required: true
270
+ description: New Parent Job Data
271
+ schema:
272
+ $ref: '#/definitions/NewParentJob'
273
+ responses:
274
+ 200:
275
+ description: ''
276
+ schema:
277
+ $ref: '#/definitions/JobRef'
278
+ /throttle:
279
+ post:
280
+ description: Creates a throttle on a tube
281
+ summary: Throttle
282
+ tags:
283
+ - Actions
284
+ operationId: ThrottlePost
285
+ produces:
286
+ - application/json
287
+ parameters:
288
+ - name: throttle
289
+ in: body
290
+ required: true
291
+ description: Throttle info
292
+ schema:
293
+ $ref: '#/definitions/Throttle'
294
+ responses:
295
+ 200:
296
+ description: ''
297
+ schema:
298
+ $ref: '#/definitions/TubeRef'
299
+ /pause:
300
+ put:
301
+ description: Pauses a tube
302
+ summary: Pause
303
+ tags:
304
+ - Actions
305
+ operationId: PausePost
306
+ produces:
307
+ - application/json
308
+ parameters:
309
+ - name: tube
310
+ in: query
311
+ required: true
312
+ type: string
313
+ description: Tube name
314
+ - name: stopped
315
+ in: body
316
+ required: true
317
+ description: Throttle info
318
+ schema:
319
+ $ref: '#/definitions/Pause'
320
+ responses:
321
+ 200:
322
+ description: ''
323
+ schema:
324
+ $ref: '#/definitions/TubeRef'
325
+ /set_children_started:
326
+ put:
327
+ description: When a parent job doesn't know how many children are going to be added, this is the event that sets the final children count on the parent_job, allowing it to run when the children are done.
328
+ summary: Set Children Started
329
+ tags:
330
+ - Actions
331
+ operationId: SetChildrenStartedPut
332
+ produces:
333
+ - application/json
334
+ parameters:
335
+ - name: job_id
336
+ in: query
337
+ required: true
338
+ type: string
339
+ description: Job ID
340
+ - name: force_now
341
+ in: query
342
+ required: false
343
+ type: string
344
+ description: Force parent to start now
345
+ responses:
346
+ 200:
347
+ description: ''
348
+ schema:
349
+ $ref: '#/definitions/BasicResponse'
350
+ /update_servers:
351
+ put:
352
+ description: Change server URLs
353
+ summary: Reset Server Urls
354
+ tags:
355
+ - Admin
356
+ operationId: UpdateServersPut
357
+ produces:
358
+ - application/json
359
+ parameters:
360
+ - name: server_urls
361
+ in: query
362
+ required: true
363
+ type: string
364
+ description: Comma Separated List URL String
365
+ responses:
366
+ 200:
367
+ description: ''
368
+ schema:
369
+ $ref: '#/definitions/BasicResponse'
370
+ /peek:
371
+ get:
372
+ description: Peek at next job
373
+ summary: Peek
374
+ tags:
375
+ - Actions
376
+ operationId: PeekGet
377
+ produces:
378
+ - application/json
379
+ parameters:
380
+ - name: tube
381
+ in: query
382
+ required: true
383
+ type: string
384
+ description: Tube name
385
+ - name: buried
386
+ in: query
387
+ required: false
388
+ type: string
389
+ description: Peek in buried jobs. Mutually exclusive with reserved and parent. If none of buried, reserved or parent is given, peeks in ready jobs.
390
+ - name: reserved
391
+ in: query
392
+ required: false
393
+ type: string
394
+ description: Peek in reserved jobs. Mutually exclusive with buried and parent. If none of buried, reserved or parent is given, peeks in ready jobs.
395
+ - name: parent
396
+ in: query
397
+ required: false
398
+ type: string
399
+ description: Peek in parent jobs. Mutually exclusive with buried and reserved. If none of buried, reserved or parent is given, peeks in ready jobs.
400
+ - name: offset
401
+ in: query
402
+ required: false
403
+ default: "0"
404
+ type: string
405
+ description: Offset from start
406
+ responses:
407
+ 200:
408
+ description: ''
409
+ schema:
410
+ $ref: '#/definitions/JobResponse'
411
+ definitions:
412
+ BasicResponse:
413
+ title: BasicResponse
414
+ type: object
415
+ properties:
416
+ response:
417
+ $ref: '#/definitions/BasicPayload'
418
+ required:
419
+ - response
420
+ JobRef:
421
+ title: JobRef
422
+ description: Job ID
423
+ type: object
424
+ properties:
425
+ job_id:
426
+ description: Job ID
427
+ type: string
428
+ required:
429
+ - job_id
430
+ StatsInfo:
431
+ title: StatsInfo
432
+ description: Individual Server Info
433
+ type: object
434
+ properties:
435
+ tube_name:
436
+ description: Name of tube
437
+ type: string
438
+ info:
439
+ $ref: '#/definitions/StatsTube'
440
+ required:
441
+ - tube_name
442
+ - info
443
+ NewJob:
444
+ title: NewJob
445
+ description: Values for a job submission
446
+ type: object
447
+ properties:
448
+ tube:
449
+ description: Tube name
450
+ example: default
451
+ type: string
452
+ default: default
453
+ body:
454
+ description: Text payload
455
+ example: <BODY_TEXT>
456
+ type: string
457
+ default: <BODY_TEXT>
458
+ ttl:
459
+ description: Time to live when reserved (in seconds)
460
+ example: 1200
461
+ type: integer
462
+ default: 1200
463
+ format: int32
464
+ delay:
465
+ description: Delay before becoming available for processing in seconds
466
+ example: 0
467
+ type: integer
468
+ default: 0
469
+ format: int32
470
+ priority:
471
+ description: Priority of job in tube
472
+ example: 5
473
+ type: integer
474
+ default: 5
475
+ format: int32
476
+ parent_id:
477
+ description: Parent job id (if applicable)
478
+ type: string
479
+ shard_key:
480
+ description: Shard key (if applicable)
481
+ type: string
482
+ required:
483
+ - tube
484
+ - body
485
+ - ttl
486
+ - delay
487
+ - priority
488
+ MultipleJobResponse:
489
+ title: MultipleJobResponse
490
+ description: Multi-Job Instance
491
+ type: object
492
+ properties:
493
+ jobs:
494
+ description: Array of jobs
495
+ type: array
496
+ items:
497
+ $ref: '#/definitions/JobResponse'
498
+ JobResponse:
499
+ title: JobResponse
500
+ description: Basic Job Instance
501
+ type: object
502
+ properties:
503
+ id:
504
+ description: Job id
505
+ type: string
506
+ body:
507
+ description: Body
508
+ type: string
509
+ tube:
510
+ description: Tube name
511
+ type: string
512
+ expireds:
513
+ description: Expired count
514
+ example: 0
515
+ type: integer
516
+ default: 0
517
+ format: int32
518
+ releases:
519
+ description: Release count
520
+ example: 0
521
+ type: integer
522
+ default: 0
523
+ format: int32
524
+ special:
525
+ description: Special
526
+ type: string
527
+ required:
528
+ - body
529
+ - tube
530
+ - expireds
531
+ - releases
532
+ StatsTube:
533
+ title: StatsTube
534
+ description: Information about a single tube
535
+ type: object
536
+ properties:
537
+ ready:
538
+ description: Count of ready jobs
539
+ example: 0
540
+ type: integer
541
+ default: 0
542
+ format: int32
543
+ delayed:
544
+ description: Count of delayed jobs
545
+ example: 0
546
+ type: integer
547
+ default: 0
548
+ format: int32
549
+ reserved:
550
+ description: Count of reserved jobs
551
+ example: 0
552
+ type: integer
553
+ default: 0
554
+ format: int32
555
+ buried:
556
+ description: Count of buried jobs
557
+ example: 0
558
+ type: integer
559
+ default: 0
560
+ format: int32
561
+ parents:
562
+ description: Count of parent jobs
563
+ example: 0
564
+ type: integer
565
+ default: 0
566
+ format: int32
567
+ throttle_size:
568
+ description: TPS of throttle
569
+ type: integer
570
+ format: int32
571
+ avg:
572
+ description: Average duration of job
573
+ type: integer
574
+ format: int32
575
+ tps:
576
+ description: Average completion TPS
577
+ type: integer
578
+ format: int32
579
+ tube:
580
+ description: Name of tube
581
+ type: string
582
+ required:
583
+ - ready
584
+ - delayed
585
+ - reserved
586
+ - buried
587
+ - parents
588
+ - avg
589
+ - tps
590
+ - tube
591
+ BasicPayload:
592
+ title: BasicPayload
593
+ type: object
594
+ properties:
595
+ action:
596
+ description: Name of action
597
+ type: string
598
+ job_id:
599
+ description: Job ID
600
+ type: string
601
+ error:
602
+ description: Error (If any)
603
+ type: string
604
+ job:
605
+ $ref: '#/definitions/JobResponse'
606
+ required:
607
+ - action
608
+ TubeRef:
609
+ title: TubeRef
610
+ description: Name of tube
611
+ type: object
612
+ properties:
613
+ tube:
614
+ description: Name of tube
615
+ type: string
616
+ required:
617
+ - tube
618
+ StatsResults:
619
+ title: StatsResults
620
+ description: Stats result
621
+ type: object
622
+ properties:
623
+ server_name:
624
+ description: ID of server
625
+ type: string
626
+ stats:
627
+ description: Array of server instances
628
+ type: array
629
+ items:
630
+ $ref: '#/definitions/StatsTube'
631
+ action_count:
632
+ description: Total actions taken on server
633
+ type: integer
634
+ format: int32
635
+ job_put:
636
+ description: Total puts to server
637
+ type: integer
638
+ format: int32
639
+ job_get:
640
+ description: Total gets from server
641
+ type: integer
642
+ format: int32
643
+ required:
644
+ - server_name
645
+ - stats
646
+ - action_count
647
+ - job_put
648
+ - job_get
649
+ Pause:
650
+ title: Pause
651
+ description: Pause a tuby
652
+ type: object
653
+ properties:
654
+ tube:
655
+ description: Name of tube
656
+ example: default
657
+ type: string
658
+ default: default
659
+ stopped:
660
+ description: Boolean for stopped
661
+ example: true
662
+ type: boolean
663
+ default: true
664
+ required:
665
+ - tube
666
+ - stopped
667
+ Throttle:
668
+ title: Throttle
669
+ description: Throttle on tube
670
+ type: object
671
+ properties:
672
+ tube:
673
+ description: Name of tube
674
+ example: default
675
+ type: string
676
+ default: default
677
+ tps:
678
+ description: Transactions per second
679
+ example: 1000
680
+ type: integer
681
+ default: 1000
682
+ format: int32
683
+ required:
684
+ - tube
685
+ - tps
686
+ NewParentJob:
687
+ title: NewParentJob
688
+ description: Model for a parent job
689
+ allOf:
690
+ - $ref: '#/definitions/NewJob'
691
+ - type: object
692
+ properties:
693
+ timeout:
694
+ description: Timeout to run
695
+ type: integer
696
+ format: int32
697
+ run_on_timeout:
698
+ description: Execute job after timeout
699
+ example: false
700
+ type: boolean
701
+ default: false
702
+ limit:
703
+ description: Number of children
704
+ type: integer
705
+ format: int32
706
+ tags: []