inst-jobs 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +7 -0
  2. data/bin/inst_job +4 -0
  3. data/db/migrate/20101216224513_create_delayed_jobs.rb +40 -0
  4. data/db/migrate/20110208031356_add_delayed_jobs_tag.rb +14 -0
  5. data/db/migrate/20110426161613_add_delayed_jobs_max_attempts.rb +13 -0
  6. data/db/migrate/20110516225834_add_delayed_jobs_strand.rb +14 -0
  7. data/db/migrate/20110531144916_cleanup_delayed_jobs_indexes.rb +26 -0
  8. data/db/migrate/20110610213249_optimize_delayed_jobs.rb +40 -0
  9. data/db/migrate/20110831210257_add_delayed_jobs_next_in_strand.rb +52 -0
  10. data/db/migrate/20120510004759_delayed_jobs_delete_trigger_lock_for_update.rb +31 -0
  11. data/db/migrate/20120531150712_drop_psql_jobs_pop_fn.rb +15 -0
  12. data/db/migrate/20120607164022_delayed_jobs_use_advisory_locks.rb +80 -0
  13. data/db/migrate/20120607181141_index_jobs_on_locked_by.rb +15 -0
  14. data/db/migrate/20120608191051_add_jobs_run_at_index.rb +15 -0
  15. data/db/migrate/20120927184213_change_delayed_jobs_handler_to_text.rb +13 -0
  16. data/db/migrate/20140505215131_add_failed_jobs_original_job_id.rb +13 -0
  17. data/db/migrate/20140505215510_copy_failed_jobs_original_id.rb +13 -0
  18. data/db/migrate/20140505223637_drop_failed_jobs_original_id.rb +13 -0
  19. data/db/migrate/20140512213941_add_source_to_jobs.rb +15 -0
  20. data/db/migrate/20150807133223_add_max_concurrent_to_jobs.rb +70 -0
  21. data/db/migrate/20151123210429_add_expires_at_to_jobs.rb +15 -0
  22. data/db/migrate/20151210162949_improve_max_concurrent.rb +50 -0
  23. data/lib/delayed/backend/active_record.rb +340 -0
  24. data/lib/delayed/backend/base.rb +335 -0
  25. data/lib/delayed/backend/redis/bulk_update.lua +50 -0
  26. data/lib/delayed/backend/redis/destroy_job.lua +2 -0
  27. data/lib/delayed/backend/redis/enqueue.lua +29 -0
  28. data/lib/delayed/backend/redis/fail_job.lua +5 -0
  29. data/lib/delayed/backend/redis/find_available.lua +3 -0
  30. data/lib/delayed/backend/redis/functions.rb +57 -0
  31. data/lib/delayed/backend/redis/get_and_lock_next_available.lua +17 -0
  32. data/lib/delayed/backend/redis/includes/jobs_common.lua +203 -0
  33. data/lib/delayed/backend/redis/job.rb +497 -0
  34. data/lib/delayed/backend/redis/set_running.lua +5 -0
  35. data/lib/delayed/backend/redis/tickle_strand.lua +2 -0
  36. data/lib/delayed/batch.rb +56 -0
  37. data/lib/delayed/cli.rb +101 -0
  38. data/lib/delayed/daemon.rb +103 -0
  39. data/lib/delayed/engine.rb +4 -0
  40. data/lib/delayed/job_tracking.rb +31 -0
  41. data/lib/delayed/lifecycle.rb +90 -0
  42. data/lib/delayed/log_tailer.rb +22 -0
  43. data/lib/delayed/message_sending.rb +134 -0
  44. data/lib/delayed/performable_method.rb +52 -0
  45. data/lib/delayed/periodic.rb +85 -0
  46. data/lib/delayed/plugin.rb +22 -0
  47. data/lib/delayed/pool.rb +161 -0
  48. data/lib/delayed/server/helpers.rb +28 -0
  49. data/lib/delayed/server/public/css/app.css +12 -0
  50. data/lib/delayed/server/public/js/app.js +132 -0
  51. data/lib/delayed/server/views/index.erb +90 -0
  52. data/lib/delayed/server/views/layout.erb +47 -0
  53. data/lib/delayed/server.rb +120 -0
  54. data/lib/delayed/settings.rb +90 -0
  55. data/lib/delayed/testing.rb +32 -0
  56. data/lib/delayed/version.rb +3 -0
  57. data/lib/delayed/work_queue/in_process.rb +13 -0
  58. data/lib/delayed/work_queue/parent_process.rb +180 -0
  59. data/lib/delayed/worker.rb +234 -0
  60. data/lib/delayed/yaml_extensions.rb +109 -0
  61. data/lib/delayed_job.rb +46 -0
  62. data/lib/inst-jobs.rb +1 -0
  63. data/spec/active_record_job_spec.rb +246 -0
  64. data/spec/delayed/cli_spec.rb +23 -0
  65. data/spec/delayed/daemon_spec.rb +35 -0
  66. data/spec/delayed/server_spec.rb +63 -0
  67. data/spec/delayed/settings_spec.rb +32 -0
  68. data/spec/delayed/work_queue/in_process_spec.rb +31 -0
  69. data/spec/delayed/work_queue/parent_process_spec.rb +159 -0
  70. data/spec/delayed/worker_spec.rb +16 -0
  71. data/spec/gemfiles/32.gemfile +6 -0
  72. data/spec/gemfiles/40.gemfile +5 -0
  73. data/spec/gemfiles/41.gemfile +5 -0
  74. data/spec/gemfiles/42.gemfile +5 -0
  75. data/spec/migrate/20140924140513_add_story_table.rb +7 -0
  76. data/spec/redis_job_spec.rb +140 -0
  77. data/spec/sample_jobs.rb +28 -0
  78. data/spec/shared/delayed_batch.rb +85 -0
  79. data/spec/shared/delayed_method.rb +419 -0
  80. data/spec/shared/performable_method.rb +66 -0
  81. data/spec/shared/shared_backend.rb +819 -0
  82. data/spec/shared/testing.rb +48 -0
  83. data/spec/shared/worker.rb +378 -0
  84. data/spec/shared_jobs_specs.rb +15 -0
  85. data/spec/spec_helper.rb +97 -0
  86. metadata +390 -0
metadata ADDED
@@ -0,0 +1,390 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: inst-jobs
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.11.0
5
+ platform: ruby
6
+ authors:
7
+ - Tobias Luetke
8
+ - Brian Palmer
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2016-03-23 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: after_transaction_commit
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - '='
19
+ - !ruby/object:Gem::Version
20
+ version: 1.0.1
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - '='
26
+ - !ruby/object:Gem::Version
27
+ version: 1.0.1
28
+ - !ruby/object:Gem::Dependency
29
+ name: rails
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '3.2'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '3.2'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rufus-scheduler
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: 3.1.2
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: 3.1.2
56
+ - !ruby/object:Gem::Dependency
57
+ name: redis
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">"
61
+ - !ruby/object:Gem::Version
62
+ version: '3.0'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">"
68
+ - !ruby/object:Gem::Version
69
+ version: '3.0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: redis-scripting
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: 1.0.1
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: 1.0.1
84
+ - !ruby/object:Gem::Dependency
85
+ name: bump
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: database_cleaner
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - '='
103
+ - !ruby/object:Gem::Version
104
+ version: 1.3.0
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - '='
110
+ - !ruby/object:Gem::Version
111
+ version: 1.3.0
112
+ - !ruby/object:Gem::Dependency
113
+ name: pg
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: pry
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ - !ruby/object:Gem::Dependency
141
+ name: rake
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ version: '0'
147
+ type: :development
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ - !ruby/object:Gem::Dependency
155
+ name: rspec
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - '='
159
+ - !ruby/object:Gem::Version
160
+ version: 3.4.0
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - '='
166
+ - !ruby/object:Gem::Version
167
+ version: 3.4.0
168
+ - !ruby/object:Gem::Dependency
169
+ name: test_after_commit
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - '='
173
+ - !ruby/object:Gem::Version
174
+ version: 0.4.1
175
+ type: :development
176
+ prerelease: false
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - '='
180
+ - !ruby/object:Gem::Version
181
+ version: 0.4.1
182
+ - !ruby/object:Gem::Dependency
183
+ name: timecop
184
+ requirement: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - '='
187
+ - !ruby/object:Gem::Version
188
+ version: 0.7.1
189
+ type: :development
190
+ prerelease: false
191
+ version_requirements: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - '='
194
+ - !ruby/object:Gem::Version
195
+ version: 0.7.1
196
+ - !ruby/object:Gem::Dependency
197
+ name: wwtd
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - "~>"
201
+ - !ruby/object:Gem::Version
202
+ version: 1.3.0
203
+ type: :development
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - "~>"
208
+ - !ruby/object:Gem::Version
209
+ version: 1.3.0
210
+ - !ruby/object:Gem::Dependency
211
+ name: sinatra
212
+ requirement: !ruby/object:Gem::Requirement
213
+ requirements:
214
+ - - ">="
215
+ - !ruby/object:Gem::Version
216
+ version: '0'
217
+ type: :development
218
+ prerelease: false
219
+ version_requirements: !ruby/object:Gem::Requirement
220
+ requirements:
221
+ - - ">="
222
+ - !ruby/object:Gem::Version
223
+ version: '0'
224
+ - !ruby/object:Gem::Dependency
225
+ name: sinatra-contrib
226
+ requirement: !ruby/object:Gem::Requirement
227
+ requirements:
228
+ - - ">="
229
+ - !ruby/object:Gem::Version
230
+ version: '0'
231
+ type: :development
232
+ prerelease: false
233
+ version_requirements: !ruby/object:Gem::Requirement
234
+ requirements:
235
+ - - ">="
236
+ - !ruby/object:Gem::Version
237
+ version: '0'
238
+ - !ruby/object:Gem::Dependency
239
+ name: rack-test
240
+ requirement: !ruby/object:Gem::Requirement
241
+ requirements:
242
+ - - ">="
243
+ - !ruby/object:Gem::Version
244
+ version: '0'
245
+ type: :development
246
+ prerelease: false
247
+ version_requirements: !ruby/object:Gem::Requirement
248
+ requirements:
249
+ - - ">="
250
+ - !ruby/object:Gem::Version
251
+ version: '0'
252
+ description:
253
+ email:
254
+ - brianp@instructure.com
255
+ executables:
256
+ - inst_job
257
+ extensions: []
258
+ extra_rdoc_files: []
259
+ files:
260
+ - bin/inst_job
261
+ - db/migrate/20101216224513_create_delayed_jobs.rb
262
+ - db/migrate/20110208031356_add_delayed_jobs_tag.rb
263
+ - db/migrate/20110426161613_add_delayed_jobs_max_attempts.rb
264
+ - db/migrate/20110516225834_add_delayed_jobs_strand.rb
265
+ - db/migrate/20110531144916_cleanup_delayed_jobs_indexes.rb
266
+ - db/migrate/20110610213249_optimize_delayed_jobs.rb
267
+ - db/migrate/20110831210257_add_delayed_jobs_next_in_strand.rb
268
+ - db/migrate/20120510004759_delayed_jobs_delete_trigger_lock_for_update.rb
269
+ - db/migrate/20120531150712_drop_psql_jobs_pop_fn.rb
270
+ - db/migrate/20120607164022_delayed_jobs_use_advisory_locks.rb
271
+ - db/migrate/20120607181141_index_jobs_on_locked_by.rb
272
+ - db/migrate/20120608191051_add_jobs_run_at_index.rb
273
+ - db/migrate/20120927184213_change_delayed_jobs_handler_to_text.rb
274
+ - db/migrate/20140505215131_add_failed_jobs_original_job_id.rb
275
+ - db/migrate/20140505215510_copy_failed_jobs_original_id.rb
276
+ - db/migrate/20140505223637_drop_failed_jobs_original_id.rb
277
+ - db/migrate/20140512213941_add_source_to_jobs.rb
278
+ - db/migrate/20150807133223_add_max_concurrent_to_jobs.rb
279
+ - db/migrate/20151123210429_add_expires_at_to_jobs.rb
280
+ - db/migrate/20151210162949_improve_max_concurrent.rb
281
+ - lib/delayed/backend/active_record.rb
282
+ - lib/delayed/backend/base.rb
283
+ - lib/delayed/backend/redis/bulk_update.lua
284
+ - lib/delayed/backend/redis/destroy_job.lua
285
+ - lib/delayed/backend/redis/enqueue.lua
286
+ - lib/delayed/backend/redis/fail_job.lua
287
+ - lib/delayed/backend/redis/find_available.lua
288
+ - lib/delayed/backend/redis/functions.rb
289
+ - lib/delayed/backend/redis/get_and_lock_next_available.lua
290
+ - lib/delayed/backend/redis/includes/jobs_common.lua
291
+ - lib/delayed/backend/redis/job.rb
292
+ - lib/delayed/backend/redis/set_running.lua
293
+ - lib/delayed/backend/redis/tickle_strand.lua
294
+ - lib/delayed/batch.rb
295
+ - lib/delayed/cli.rb
296
+ - lib/delayed/daemon.rb
297
+ - lib/delayed/engine.rb
298
+ - lib/delayed/job_tracking.rb
299
+ - lib/delayed/lifecycle.rb
300
+ - lib/delayed/log_tailer.rb
301
+ - lib/delayed/message_sending.rb
302
+ - lib/delayed/performable_method.rb
303
+ - lib/delayed/periodic.rb
304
+ - lib/delayed/plugin.rb
305
+ - lib/delayed/pool.rb
306
+ - lib/delayed/server.rb
307
+ - lib/delayed/server/helpers.rb
308
+ - lib/delayed/server/public/css/app.css
309
+ - lib/delayed/server/public/js/app.js
310
+ - lib/delayed/server/views/index.erb
311
+ - lib/delayed/server/views/layout.erb
312
+ - lib/delayed/settings.rb
313
+ - lib/delayed/testing.rb
314
+ - lib/delayed/version.rb
315
+ - lib/delayed/work_queue/in_process.rb
316
+ - lib/delayed/work_queue/parent_process.rb
317
+ - lib/delayed/worker.rb
318
+ - lib/delayed/yaml_extensions.rb
319
+ - lib/delayed_job.rb
320
+ - lib/inst-jobs.rb
321
+ - spec/active_record_job_spec.rb
322
+ - spec/delayed/cli_spec.rb
323
+ - spec/delayed/daemon_spec.rb
324
+ - spec/delayed/server_spec.rb
325
+ - spec/delayed/settings_spec.rb
326
+ - spec/delayed/work_queue/in_process_spec.rb
327
+ - spec/delayed/work_queue/parent_process_spec.rb
328
+ - spec/delayed/worker_spec.rb
329
+ - spec/gemfiles/32.gemfile
330
+ - spec/gemfiles/40.gemfile
331
+ - spec/gemfiles/41.gemfile
332
+ - spec/gemfiles/42.gemfile
333
+ - spec/migrate/20140924140513_add_story_table.rb
334
+ - spec/redis_job_spec.rb
335
+ - spec/sample_jobs.rb
336
+ - spec/shared/delayed_batch.rb
337
+ - spec/shared/delayed_method.rb
338
+ - spec/shared/performable_method.rb
339
+ - spec/shared/shared_backend.rb
340
+ - spec/shared/testing.rb
341
+ - spec/shared/worker.rb
342
+ - spec/shared_jobs_specs.rb
343
+ - spec/spec_helper.rb
344
+ homepage: http://www.instructure.com
345
+ licenses: []
346
+ metadata: {}
347
+ post_install_message:
348
+ rdoc_options: []
349
+ require_paths:
350
+ - lib
351
+ required_ruby_version: !ruby/object:Gem::Requirement
352
+ requirements:
353
+ - - ">="
354
+ - !ruby/object:Gem::Version
355
+ version: '2.0'
356
+ required_rubygems_version: !ruby/object:Gem::Requirement
357
+ requirements:
358
+ - - ">="
359
+ - !ruby/object:Gem::Version
360
+ version: '0'
361
+ requirements: []
362
+ rubyforge_project:
363
+ rubygems_version: 2.5.1
364
+ signing_key:
365
+ specification_version: 4
366
+ summary: Instructure-maintained fork of delayed_job
367
+ test_files:
368
+ - spec/active_record_job_spec.rb
369
+ - spec/delayed/cli_spec.rb
370
+ - spec/delayed/daemon_spec.rb
371
+ - spec/delayed/server_spec.rb
372
+ - spec/delayed/settings_spec.rb
373
+ - spec/delayed/work_queue/in_process_spec.rb
374
+ - spec/delayed/work_queue/parent_process_spec.rb
375
+ - spec/delayed/worker_spec.rb
376
+ - spec/gemfiles/32.gemfile
377
+ - spec/gemfiles/40.gemfile
378
+ - spec/gemfiles/41.gemfile
379
+ - spec/gemfiles/42.gemfile
380
+ - spec/migrate/20140924140513_add_story_table.rb
381
+ - spec/redis_job_spec.rb
382
+ - spec/sample_jobs.rb
383
+ - spec/shared/delayed_batch.rb
384
+ - spec/shared/delayed_method.rb
385
+ - spec/shared/performable_method.rb
386
+ - spec/shared/shared_backend.rb
387
+ - spec/shared/testing.rb
388
+ - spec/shared/worker.rb
389
+ - spec/shared_jobs_specs.rb
390
+ - spec/spec_helper.rb