konstruo 1.0.0

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 (126) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +3 -0
  3. data/.rubocop.yml +22 -0
  4. data/.tool-versions +1 -0
  5. data/CHANGELOG.md +21 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +35 -0
  8. data/Rakefile +10 -0
  9. data/lib/konstruo/mapper.rb +120 -0
  10. data/lib/konstruo/version.rb +6 -0
  11. data/lib/konstruo.rb +18 -0
  12. data/sorbet/config +4 -0
  13. data/sorbet/rbi/annotations/.gitattributes +1 -0
  14. data/sorbet/rbi/annotations/actionmailer.rbi +10 -0
  15. data/sorbet/rbi/annotations/actionpack.rbi +430 -0
  16. data/sorbet/rbi/annotations/actionview.rbi +75 -0
  17. data/sorbet/rbi/annotations/activejob.rbi +44 -0
  18. data/sorbet/rbi/annotations/activemodel.rbi +89 -0
  19. data/sorbet/rbi/annotations/activerecord.rbi +92 -0
  20. data/sorbet/rbi/annotations/activesupport.rbi +454 -0
  21. data/sorbet/rbi/annotations/globalid.rbi +30 -0
  22. data/sorbet/rbi/annotations/minitest.rbi +119 -0
  23. data/sorbet/rbi/annotations/railties.rbi +61 -0
  24. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  25. data/sorbet/rbi/dsl/.gitattributes +1 -0
  26. data/sorbet/rbi/dsl/active_support/callbacks.rbi +23 -0
  27. data/sorbet/rbi/gems/.gitattributes +1 -0
  28. data/sorbet/rbi/gems/actioncable@7.2.1.rbi +3096 -0
  29. data/sorbet/rbi/gems/actionmailbox@7.2.1.rbi +1832 -0
  30. data/sorbet/rbi/gems/actionmailer@7.2.1.rbi +2664 -0
  31. data/sorbet/rbi/gems/actionpack@7.2.1.rbi +20536 -0
  32. data/sorbet/rbi/gems/actiontext@7.2.1.rbi +1697 -0
  33. data/sorbet/rbi/gems/actionview@7.2.1.rbi +15752 -0
  34. data/sorbet/rbi/gems/activejob@7.2.1.rbi +2828 -0
  35. data/sorbet/rbi/gems/activemodel@7.2.1.rbi +6762 -0
  36. data/sorbet/rbi/gems/activerecord@7.2.1.rbi +41433 -0
  37. data/sorbet/rbi/gems/activestorage@7.2.1.rbi +3247 -0
  38. data/sorbet/rbi/gems/activesupport@7.2.1.rbi +21142 -0
  39. data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
  40. data/sorbet/rbi/gems/base64@0.2.0.rbi +509 -0
  41. data/sorbet/rbi/gems/bigdecimal@3.1.8.rbi +78 -0
  42. data/sorbet/rbi/gems/builder@3.3.0.rbi +9 -0
  43. data/sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi +11645 -0
  44. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +9 -0
  45. data/sorbet/rbi/gems/crass@1.0.6.rbi +623 -0
  46. data/sorbet/rbi/gems/dashbrains-rubocop-config@1.0.4.rbi +9 -0
  47. data/sorbet/rbi/gems/date@3.3.4.rbi +75 -0
  48. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +1131 -0
  49. data/sorbet/rbi/gems/drb@2.2.1.rbi +1347 -0
  50. data/sorbet/rbi/gems/erubi@1.13.0.rbi +150 -0
  51. data/sorbet/rbi/gems/globalid@1.2.1.rbi +749 -0
  52. data/sorbet/rbi/gems/i18n@1.14.5.rbi +2359 -0
  53. data/sorbet/rbi/gems/io-console@0.7.2.rbi +9 -0
  54. data/sorbet/rbi/gems/json@2.7.2.rbi +1562 -0
  55. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
  56. data/sorbet/rbi/gems/logger@1.6.1.rbi +920 -0
  57. data/sorbet/rbi/gems/loofah@2.22.0.rbi +1081 -0
  58. data/sorbet/rbi/gems/mail@2.8.1.rbi +8658 -0
  59. data/sorbet/rbi/gems/marcel@1.0.4.rbi +239 -0
  60. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +173 -0
  61. data/sorbet/rbi/gems/minitest@5.25.1.rbi +1546 -0
  62. data/sorbet/rbi/gems/net-imap@0.4.16.rbi +10845 -0
  63. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +927 -0
  64. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +292 -0
  65. data/sorbet/rbi/gems/net-smtp@0.5.0.rbi +1228 -0
  66. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  67. data/sorbet/rbi/gems/nio4r@2.7.3.rbi +293 -0
  68. data/sorbet/rbi/gems/nokogiri@1.16.7.rbi +7311 -0
  69. data/sorbet/rbi/gems/parallel@1.26.3.rbi +291 -0
  70. data/sorbet/rbi/gems/parser@3.3.5.0.rbi +5519 -0
  71. data/sorbet/rbi/gems/prism@1.0.0.rbi +35493 -0
  72. data/sorbet/rbi/gems/psych@5.1.2.rbi +1769 -0
  73. data/sorbet/rbi/gems/racc@1.8.1.rbi +162 -0
  74. data/sorbet/rbi/gems/rack-session@2.0.0.rbi +727 -0
  75. data/sorbet/rbi/gems/rack-test@2.1.0.rbi +747 -0
  76. data/sorbet/rbi/gems/rack@3.1.7.rbi +4902 -0
  77. data/sorbet/rbi/gems/rackup@2.1.0.rbi +390 -0
  78. data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +758 -0
  79. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi +785 -0
  80. data/sorbet/rbi/gems/rails@7.2.1.rbi +9 -0
  81. data/sorbet/rbi/gems/railties@7.2.1.rbi +3824 -0
  82. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  83. data/sorbet/rbi/gems/rake@13.2.1.rbi +3046 -0
  84. data/sorbet/rbi/gems/rbi@0.2.0.rbi +4105 -0
  85. data/sorbet/rbi/gems/rdoc@6.7.0.rbi +12721 -0
  86. data/sorbet/rbi/gems/regexp_parser@2.9.2.rbi +3772 -0
  87. data/sorbet/rbi/gems/reline@0.5.10.rbi +9 -0
  88. data/sorbet/rbi/gems/rspec-core@3.13.1.rbi +11012 -0
  89. data/sorbet/rbi/gems/rspec-expectations@3.13.3.rbi +8183 -0
  90. data/sorbet/rbi/gems/rspec-mocks@3.13.1.rbi +5341 -0
  91. data/sorbet/rbi/gems/rspec-support@3.13.1.rbi +1630 -0
  92. data/sorbet/rbi/gems/rspec@3.13.0.rbi +83 -0
  93. data/sorbet/rbi/gems/rubocop-ast@1.32.3.rbi +7446 -0
  94. data/sorbet/rbi/gems/rubocop-capybara@2.21.0.rbi +9 -0
  95. data/sorbet/rbi/gems/rubocop-factory_bot@2.26.1.rbi +9 -0
  96. data/sorbet/rbi/gems/rubocop-graphql@1.5.4.rbi +9 -0
  97. data/sorbet/rbi/gems/rubocop-minitest@0.36.0.rbi +9 -0
  98. data/sorbet/rbi/gems/rubocop-performance@1.21.1.rbi +9 -0
  99. data/sorbet/rbi/gems/rubocop-rails@2.26.1.rbi +9 -0
  100. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +329 -0
  101. data/sorbet/rbi/gems/rubocop-rspec@3.0.5.rbi +9 -0
  102. data/sorbet/rbi/gems/rubocop-rspec_rails@2.30.0.rbi +9 -0
  103. data/sorbet/rbi/gems/rubocop-sorbet@0.8.5.rbi +9 -0
  104. data/sorbet/rbi/gems/rubocop@1.66.1.rbi +58268 -0
  105. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  106. data/sorbet/rbi/gems/securerandom@0.3.1.rbi +396 -0
  107. data/sorbet/rbi/gems/spoom@1.4.2.rbi +4932 -0
  108. data/sorbet/rbi/gems/stringio@3.1.1.rbi +9 -0
  109. data/sorbet/rbi/gems/tapioca@0.16.2.rbi +3581 -0
  110. data/sorbet/rbi/gems/thor@1.3.2.rbi +4378 -0
  111. data/sorbet/rbi/gems/timeout@0.4.1.rbi +149 -0
  112. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5918 -0
  113. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +66 -0
  114. data/sorbet/rbi/gems/useragent@0.16.10.rbi +9 -0
  115. data/sorbet/rbi/gems/webrick@1.8.1.rbi +2607 -0
  116. data/sorbet/rbi/gems/websocket-driver@0.7.6.rbi +993 -0
  117. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +121 -0
  118. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
  119. data/sorbet/rbi/gems/yard@0.9.37.rbi +18570 -0
  120. data/sorbet/rbi/gems/zeitwerk@2.6.18.rbi +1051 -0
  121. data/sorbet/rbi/todo.rbi +6 -0
  122. data/sorbet/tapioca/config.yml +13 -0
  123. data/sorbet/tapioca/require.rb +9 -0
  124. data/tasks/bundle_update.rake +14 -0
  125. data/tasks/sorbet.rake +26 -0
  126. metadata +216 -0
@@ -0,0 +1,2828 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `activejob` gem.
5
+ # Please instead update this file by running `bin/tapioca gem activejob`.
6
+
7
+
8
+ # :markup: markdown
9
+ # :include: ../README.md
10
+ #
11
+ # source://activejob//lib/active_job/gem_version.rb#3
12
+ module ActiveJob
13
+ extend ::ActiveSupport::Autoload
14
+
15
+ class << self
16
+ # source://activejob//lib/active_job/queue_adapter.rb#7
17
+ def adapter_name(adapter); end
18
+
19
+ # source://activejob//lib/active_job/deprecator.rb#4
20
+ def deprecator; end
21
+
22
+ # Returns the currently loaded version of Active Job as a +Gem::Version+.
23
+ #
24
+ # source://activejob//lib/active_job/gem_version.rb#5
25
+ def gem_version; end
26
+
27
+ # Push many jobs onto the queue at once without running enqueue callbacks.
28
+ # Queue adapters may communicate the enqueue status of each job by setting
29
+ # successfully_enqueued and/or enqueue_error on the passed-in job instances.
30
+ #
31
+ # source://activejob//lib/active_job/enqueuing.rb#14
32
+ def perform_all_later(*jobs); end
33
+
34
+ # source://activejob//lib/active_job.rb#52
35
+ def use_big_decimal_serializer; end
36
+
37
+ # source://activejob//lib/active_job.rb#58
38
+ def use_big_decimal_serializer=(value); end
39
+
40
+ # source://activejob//lib/active_job.rb#69
41
+ def verbose_enqueue_logs; end
42
+
43
+ # source://activejob//lib/active_job.rb#69
44
+ def verbose_enqueue_logs=(_arg0); end
45
+
46
+ # Returns the currently loaded version of Active Job as a +Gem::Version+.
47
+ #
48
+ # source://activejob//lib/active_job/version.rb#7
49
+ def version; end
50
+
51
+ private
52
+
53
+ # source://activejob//lib/active_job/instrumentation.rb#6
54
+ def instrument_enqueue_all(queue_adapter, jobs); end
55
+ end
56
+ end
57
+
58
+ # source://activejob//lib/active_job/arguments.rb#28
59
+ module ActiveJob::Arguments
60
+ extend ::ActiveJob::Arguments
61
+
62
+ # Deserializes a set of arguments. Intrinsic types that can safely be
63
+ # deserialized without mutation are returned as-is. Arrays/Hashes are
64
+ # deserialized element by element. All other types are deserialized using
65
+ # GlobalID.
66
+ #
67
+ # source://activejob//lib/active_job/arguments.rb#42
68
+ def deserialize(arguments); end
69
+
70
+ # Serializes a set of arguments. Intrinsic types that can safely be
71
+ # serialized without mutation are returned as-is. Arrays/Hashes are
72
+ # serialized element by element. All other types are serialized using
73
+ # GlobalID.
74
+ #
75
+ # source://activejob//lib/active_job/arguments.rb#34
76
+ def serialize(arguments); end
77
+
78
+ private
79
+
80
+ # source://activejob//lib/active_job/arguments.rb#190
81
+ def convert_to_global_id_hash(argument); end
82
+
83
+ # @return [Boolean]
84
+ #
85
+ # source://activejob//lib/active_job/arguments.rb#137
86
+ def custom_serialized?(hash); end
87
+
88
+ # source://activejob//lib/active_job/arguments.rb#110
89
+ def deserialize_argument(argument); end
90
+
91
+ # source://activejob//lib/active_job/arguments.rb#133
92
+ def deserialize_global_id(hash); end
93
+
94
+ # source://activejob//lib/active_job/arguments.rb#147
95
+ def deserialize_hash(serialized_hash); end
96
+
97
+ # source://activejob//lib/active_job/arguments.rb#71
98
+ def serialize_argument(argument); end
99
+
100
+ # source://activejob//lib/active_job/arguments.rb#141
101
+ def serialize_hash(argument); end
102
+
103
+ # source://activejob//lib/active_job/arguments.rb#160
104
+ def serialize_hash_key(key); end
105
+
106
+ # source://activejob//lib/active_job/arguments.rb#171
107
+ def serialize_indifferent_hash(indifferent_hash); end
108
+
109
+ # @return [Boolean]
110
+ #
111
+ # source://activejob//lib/active_job/arguments.rb#129
112
+ def serialized_global_id?(hash); end
113
+
114
+ # source://activejob//lib/active_job/arguments.rb#177
115
+ def transform_symbol_keys(hash, symbol_keys); end
116
+ end
117
+
118
+ # source://activejob//lib/active_job/arguments.rb#50
119
+ ActiveJob::Arguments::GLOBALID_KEY = T.let(T.unsafe(nil), String)
120
+
121
+ # source://activejob//lib/active_job/arguments.rb#58
122
+ ActiveJob::Arguments::OBJECT_SERIALIZER_KEY = T.let(T.unsafe(nil), String)
123
+
124
+ # source://activejob//lib/active_job/arguments.rb#61
125
+ ActiveJob::Arguments::RESERVED_KEYS = T.let(T.unsafe(nil), Array)
126
+
127
+ # source://activejob//lib/active_job/arguments.rb#54
128
+ ActiveJob::Arguments::RUBY2_KEYWORDS_KEY = T.let(T.unsafe(nil), String)
129
+
130
+ # source://activejob//lib/active_job/arguments.rb#52
131
+ ActiveJob::Arguments::SYMBOL_KEYS_KEY = T.let(T.unsafe(nil), String)
132
+
133
+ # source://activejob//lib/active_job/arguments.rb#56
134
+ ActiveJob::Arguments::WITH_INDIFFERENT_ACCESS_KEY = T.let(T.unsafe(nil), String)
135
+
136
+ # = Active Job \Base
137
+ #
138
+ # Active Job objects can be configured to work with different backend
139
+ # queuing frameworks. To specify a queue adapter to use:
140
+ #
141
+ # ActiveJob::Base.queue_adapter = :inline
142
+ #
143
+ # A list of supported adapters can be found in QueueAdapters.
144
+ #
145
+ # Active Job objects can be defined by creating a class that inherits
146
+ # from the ActiveJob::Base class. The only necessary method to
147
+ # implement is the "perform" method.
148
+ #
149
+ # To define an Active Job object:
150
+ #
151
+ # class ProcessPhotoJob < ActiveJob::Base
152
+ # def perform(photo)
153
+ # photo.watermark!('Rails')
154
+ # photo.rotate!(90.degrees)
155
+ # photo.resize_to_fit!(300, 300)
156
+ # photo.upload!
157
+ # end
158
+ # end
159
+ #
160
+ # Records that are passed in are serialized/deserialized using Global
161
+ # ID. More information can be found in Arguments.
162
+ #
163
+ # To enqueue a job to be performed as soon as the queuing system is free:
164
+ #
165
+ # ProcessPhotoJob.perform_later(photo)
166
+ #
167
+ # To enqueue a job to be processed at some point in the future:
168
+ #
169
+ # ProcessPhotoJob.set(wait_until: Date.tomorrow.noon).perform_later(photo)
170
+ #
171
+ # More information can be found in ActiveJob::Core::ClassMethods#set
172
+ #
173
+ # A job can also be processed immediately without sending to the queue:
174
+ #
175
+ # ProcessPhotoJob.perform_now(photo)
176
+ #
177
+ # == Exceptions
178
+ #
179
+ # * DeserializationError - Error class for deserialization errors.
180
+ # * SerializationError - Error class for serialization errors.
181
+ #
182
+ # source://activejob//lib/active_job/base.rb#63
183
+ class ActiveJob::Base
184
+ include ::ActiveJob::Core
185
+ include ::ActiveJob::QueueAdapter
186
+ include ::ActiveJob::QueueName
187
+ include ::ActiveJob::QueuePriority
188
+ include ::ActiveJob::Enqueuing
189
+ include ::ActiveSupport::Rescuable
190
+ include ::ActiveJob::Execution
191
+ include ::ActiveSupport::Callbacks
192
+ include ::ActiveJob::Callbacks
193
+ include ::ActiveJob::Exceptions
194
+ include ::ActiveJob::Instrumentation
195
+ include ::ActiveJob::Logging
196
+ include ::ActiveJob::Timezones
197
+ include ::ActiveJob::Translation
198
+ include ::ActiveJob::TestHelper::TestQueueAdapter
199
+ extend ::ActiveJob::Core::ClassMethods
200
+ extend ::ActiveJob::QueueAdapter::ClassMethods
201
+ extend ::ActiveJob::QueueName::ClassMethods
202
+ extend ::ActiveJob::QueuePriority::ClassMethods
203
+ extend ::ActiveJob::Enqueuing::ClassMethods
204
+ extend ::ActiveSupport::Rescuable::ClassMethods
205
+ extend ::ActiveJob::Execution::ClassMethods
206
+ extend ::ActiveSupport::Callbacks::ClassMethods
207
+ extend ::ActiveSupport::DescendantsTracker
208
+ extend ::ActiveJob::Callbacks::ClassMethods
209
+ extend ::ActiveJob::Exceptions::ClassMethods
210
+ extend ::ActiveJob::TestHelper::TestQueueAdapter::ClassMethods
211
+
212
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#70
213
+ def __callbacks; end
214
+
215
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#70
216
+ def __callbacks?; end
217
+
218
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#924
219
+ def _enqueue_callbacks; end
220
+
221
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#924
222
+ def _perform_callbacks; end
223
+
224
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#912
225
+ def _run_enqueue_callbacks(&block); end
226
+
227
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#912
228
+ def _run_perform_callbacks(&block); end
229
+
230
+ # source://activejob//lib/active_job/exceptions.rb#12
231
+ def after_discard_procs; end
232
+
233
+ # source://activejob//lib/active_job/exceptions.rb#12
234
+ def after_discard_procs=(_arg0); end
235
+
236
+ # source://activejob//lib/active_job/exceptions.rb#12
237
+ def after_discard_procs?; end
238
+
239
+ # source://activejob//lib/active_job/logging.rb#15
240
+ def logger; end
241
+
242
+ # source://activejob//lib/active_job/logging.rb#15
243
+ def logger=(val); end
244
+
245
+ # source://activejob//lib/active_job/queue_adapter.rb#27
246
+ def queue_adapter(&_arg0); end
247
+
248
+ # source://activejob//lib/active_job/queue_name.rb#57
249
+ def queue_name_prefix; end
250
+
251
+ # source://activejob//lib/active_job/queue_name.rb#57
252
+ def queue_name_prefix=(_arg0); end
253
+
254
+ # source://activejob//lib/active_job/queue_name.rb#57
255
+ def queue_name_prefix?; end
256
+
257
+ # source://activesupport/7.2.1/lib/active_support/rescuable.rb#15
258
+ def rescue_handlers; end
259
+
260
+ # source://activesupport/7.2.1/lib/active_support/rescuable.rb#15
261
+ def rescue_handlers=(_arg0); end
262
+
263
+ # source://activesupport/7.2.1/lib/active_support/rescuable.rb#15
264
+ def rescue_handlers?; end
265
+
266
+ class << self
267
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#70
268
+ def __callbacks; end
269
+
270
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#70
271
+ def __callbacks=(value); end
272
+
273
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#70
274
+ def __callbacks?; end
275
+
276
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#916
277
+ def _enqueue_callbacks; end
278
+
279
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#920
280
+ def _enqueue_callbacks=(value); end
281
+
282
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#916
283
+ def _perform_callbacks; end
284
+
285
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#920
286
+ def _perform_callbacks=(value); end
287
+
288
+ # source://activejob//lib/active_job/queue_adapter.rb#25
289
+ def _queue_adapter; end
290
+
291
+ # source://activejob//lib/active_job/queue_adapter.rb#25
292
+ def _queue_adapter=(value); end
293
+
294
+ # source://activejob//lib/active_job/queue_adapter.rb#24
295
+ def _queue_adapter_name; end
296
+
297
+ # source://activejob//lib/active_job/queue_adapter.rb#24
298
+ def _queue_adapter_name=(value); end
299
+
300
+ # source://activejob//lib/active_job/test_helper.rb#19
301
+ def _test_adapter; end
302
+
303
+ # source://activejob//lib/active_job/test_helper.rb#19
304
+ def _test_adapter=(value); end
305
+
306
+ # source://activejob//lib/active_job/exceptions.rb#12
307
+ def after_discard_procs; end
308
+
309
+ # source://activejob//lib/active_job/exceptions.rb#12
310
+ def after_discard_procs=(value); end
311
+
312
+ # source://activejob//lib/active_job/exceptions.rb#12
313
+ def after_discard_procs?; end
314
+
315
+ # source://activejob//lib/active_job/enqueuing.rb#54
316
+ def enqueue_after_transaction_commit; end
317
+
318
+ # source://activejob//lib/active_job/enqueuing.rb#54
319
+ def enqueue_after_transaction_commit=(value); end
320
+
321
+ # source://activejob//lib/active_job/logging.rb#26
322
+ def log_arguments; end
323
+
324
+ # source://activejob//lib/active_job/logging.rb#26
325
+ def log_arguments=(value); end
326
+
327
+ # source://activejob//lib/active_job/logging.rb#26
328
+ def log_arguments?; end
329
+
330
+ # source://activejob//lib/active_job/logging.rb#15
331
+ def logger; end
332
+
333
+ # source://activejob//lib/active_job/logging.rb#15
334
+ def logger=(val); end
335
+
336
+ # source://activejob//lib/active_job/queue_priority.rb#49
337
+ def priority; end
338
+
339
+ # source://activejob//lib/active_job/queue_priority.rb#49
340
+ def priority=(value); end
341
+
342
+ # source://activejob//lib/active_job/queue_priority.rb#49
343
+ def priority?; end
344
+
345
+ # source://activejob//lib/active_job/queue_name.rb#55
346
+ def queue_name; end
347
+
348
+ # source://activejob//lib/active_job/queue_name.rb#55
349
+ def queue_name=(value); end
350
+
351
+ # source://activejob//lib/active_job/queue_name.rb#55
352
+ def queue_name?; end
353
+
354
+ # source://activejob//lib/active_job/queue_name.rb#56
355
+ def queue_name_delimiter; end
356
+
357
+ # source://activejob//lib/active_job/queue_name.rb#56
358
+ def queue_name_delimiter=(value); end
359
+
360
+ # source://activejob//lib/active_job/queue_name.rb#56
361
+ def queue_name_delimiter?; end
362
+
363
+ # source://activejob//lib/active_job/queue_name.rb#57
364
+ def queue_name_prefix; end
365
+
366
+ # source://activejob//lib/active_job/queue_name.rb#57
367
+ def queue_name_prefix=(value); end
368
+
369
+ # source://activejob//lib/active_job/queue_name.rb#57
370
+ def queue_name_prefix?; end
371
+
372
+ # source://activesupport/7.2.1/lib/active_support/rescuable.rb#15
373
+ def rescue_handlers; end
374
+
375
+ # source://activesupport/7.2.1/lib/active_support/rescuable.rb#15
376
+ def rescue_handlers=(value); end
377
+
378
+ # source://activesupport/7.2.1/lib/active_support/rescuable.rb#15
379
+ def rescue_handlers?; end
380
+
381
+ # source://activejob//lib/active_job/exceptions.rb#11
382
+ def retry_jitter; end
383
+
384
+ # source://activejob//lib/active_job/exceptions.rb#11
385
+ def retry_jitter=(value); end
386
+ end
387
+ end
388
+
389
+ # = Active Job \Callbacks
390
+ #
391
+ # Active Job provides hooks during the life cycle of a job. Callbacks allow you
392
+ # to trigger logic during this cycle. Available callbacks are:
393
+ #
394
+ # * <tt>before_enqueue</tt>
395
+ # * <tt>around_enqueue</tt>
396
+ # * <tt>after_enqueue</tt>
397
+ # * <tt>before_perform</tt>
398
+ # * <tt>around_perform</tt>
399
+ # * <tt>after_perform</tt>
400
+ #
401
+ # source://activejob//lib/active_job/callbacks.rb#18
402
+ module ActiveJob::Callbacks
403
+ extend ::ActiveSupport::Concern
404
+ extend ::ActiveSupport::Callbacks
405
+ include GeneratedInstanceMethods
406
+ include ::ActiveSupport::Callbacks
407
+
408
+ mixes_in_class_methods GeneratedClassMethods
409
+ mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods
410
+ mixes_in_class_methods ::ActiveSupport::DescendantsTracker
411
+ mixes_in_class_methods ::ActiveJob::Callbacks::ClassMethods
412
+
413
+ class << self
414
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#70
415
+ def __callbacks; end
416
+
417
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#70
418
+ def __callbacks?; end
419
+
420
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#924
421
+ def _execute_callbacks; end
422
+
423
+ # source://activesupport/7.2.1/lib/active_support/callbacks.rb#912
424
+ def _run_execute_callbacks(&block); end
425
+ end
426
+
427
+ module GeneratedClassMethods
428
+ def __callbacks; end
429
+ def __callbacks=(value); end
430
+ def __callbacks?; end
431
+ end
432
+
433
+ module GeneratedInstanceMethods
434
+ def __callbacks; end
435
+ def __callbacks?; end
436
+ end
437
+ end
438
+
439
+ # These methods will be included into any Active Job object, adding
440
+ # callbacks for +perform+ and +enqueue+ methods.
441
+ #
442
+ # source://activejob//lib/active_job/callbacks.rb#34
443
+ module ActiveJob::Callbacks::ClassMethods
444
+ # Defines a callback that will get called right after the
445
+ # job is enqueued.
446
+ #
447
+ # class VideoProcessJob < ActiveJob::Base
448
+ # queue_as :default
449
+ #
450
+ # after_enqueue do |job|
451
+ # result = job.successfully_enqueued? ? "success" : "failure"
452
+ # $statsd.increment "enqueue-video-job.#{result}"
453
+ # end
454
+ #
455
+ # def perform(video_id)
456
+ # Video.find(video_id).process
457
+ # end
458
+ # end
459
+ #
460
+ # source://activejob//lib/active_job/callbacks.rb#141
461
+ def after_enqueue(*filters, &blk); end
462
+
463
+ # Defines a callback that will get called right after the
464
+ # job's perform method has finished.
465
+ #
466
+ # class VideoProcessJob < ActiveJob::Base
467
+ # queue_as :default
468
+ #
469
+ # after_perform do |job|
470
+ # UserMailer.notify_video_processed(job.arguments.first)
471
+ # end
472
+ #
473
+ # def perform(video_id)
474
+ # Video.find(video_id).process
475
+ # end
476
+ # end
477
+ #
478
+ # source://activejob//lib/active_job/callbacks.rb#69
479
+ def after_perform(*filters, &blk); end
480
+
481
+ # Defines a callback that will get called around the enqueuing
482
+ # of the job.
483
+ #
484
+ # class VideoProcessJob < ActiveJob::Base
485
+ # queue_as :default
486
+ #
487
+ # around_enqueue do |job, block|
488
+ # $statsd.time "video-job.process" do
489
+ # block.call
490
+ # end
491
+ # end
492
+ #
493
+ # def perform(video_id)
494
+ # Video.find(video_id).process
495
+ # end
496
+ # end
497
+ #
498
+ # source://activejob//lib/active_job/callbacks.rb#162
499
+ def around_enqueue(*filters, &blk); end
500
+
501
+ # Defines a callback that will get called around the job's perform method.
502
+ #
503
+ # class VideoProcessJob < ActiveJob::Base
504
+ # queue_as :default
505
+ #
506
+ # around_perform do |job, block|
507
+ # UserMailer.notify_video_started_processing(job.arguments.first)
508
+ # block.call
509
+ # UserMailer.notify_video_processed(job.arguments.first)
510
+ # end
511
+ #
512
+ # def perform(video_id)
513
+ # Video.find(video_id).process
514
+ # end
515
+ # end
516
+ #
517
+ # You can access the return value of the job only if the execution wasn't halted.
518
+ #
519
+ # class VideoProcessJob < ActiveJob::Base
520
+ # around_perform do |job, block|
521
+ # value = block.call
522
+ # puts value # => "Hello World!"
523
+ # end
524
+ #
525
+ # def perform
526
+ # "Hello World!"
527
+ # end
528
+ # end
529
+ #
530
+ # source://activejob//lib/active_job/callbacks.rb#102
531
+ def around_perform(*filters, &blk); end
532
+
533
+ # Defines a callback that will get called right before the
534
+ # job is enqueued.
535
+ #
536
+ # class VideoProcessJob < ActiveJob::Base
537
+ # queue_as :default
538
+ #
539
+ # before_enqueue do |job|
540
+ # $statsd.increment "enqueue-video-job.try"
541
+ # end
542
+ #
543
+ # def perform(video_id)
544
+ # Video.find(video_id).process
545
+ # end
546
+ # end
547
+ #
548
+ # source://activejob//lib/active_job/callbacks.rb#121
549
+ def before_enqueue(*filters, &blk); end
550
+
551
+ # Defines a callback that will get called right before the
552
+ # job's perform method is executed.
553
+ #
554
+ # class VideoProcessJob < ActiveJob::Base
555
+ # queue_as :default
556
+ #
557
+ # before_perform do |job|
558
+ # UserMailer.notify_video_started_processing(job.arguments.first)
559
+ # end
560
+ #
561
+ # def perform(video_id)
562
+ # Video.find(video_id).process
563
+ # end
564
+ # end
565
+ #
566
+ # source://activejob//lib/active_job/callbacks.rb#50
567
+ def before_perform(*filters, &blk); end
568
+ end
569
+
570
+ # source://activejob//lib/active_job/configured_job.rb#4
571
+ class ActiveJob::ConfiguredJob
572
+ # @return [ConfiguredJob] a new instance of ConfiguredJob
573
+ #
574
+ # source://activejob//lib/active_job/configured_job.rb#5
575
+ def initialize(job_class, options = T.unsafe(nil)); end
576
+
577
+ # source://activejob//lib/active_job/configured_job.rb#18
578
+ def perform_all_later(multi_args); end
579
+
580
+ # source://activejob//lib/active_job/configured_job.rb#14
581
+ def perform_later(*_arg0, **_arg1, &_arg2); end
582
+
583
+ # source://activejob//lib/active_job/configured_job.rb#10
584
+ def perform_now(*_arg0, **_arg1, &_arg2); end
585
+ end
586
+
587
+ # = Active Job \Core
588
+ #
589
+ # Provides general behavior that will be included into every Active Job
590
+ # object that inherits from ActiveJob::Base.
591
+ #
592
+ # source://activejob//lib/active_job/core.rb#8
593
+ module ActiveJob::Core
594
+ extend ::ActiveSupport::Concern
595
+
596
+ mixes_in_class_methods ::ActiveJob::Core::ClassMethods
597
+
598
+ # Creates a new job instance. Takes the arguments that will be
599
+ # passed to the perform method.
600
+ #
601
+ # source://activejob//lib/active_job/core.rb#93
602
+ def initialize(*arguments, **_arg1); end
603
+
604
+ # Job arguments
605
+ #
606
+ # source://activejob//lib/active_job/core.rb#12
607
+ def arguments; end
608
+
609
+ # Job arguments
610
+ #
611
+ # source://activejob//lib/active_job/core.rb#12
612
+ def arguments=(_arg0); end
613
+
614
+ # Attaches the stored job data to the current instance. Receives a hash
615
+ # returned from +serialize+
616
+ #
617
+ # ==== Examples
618
+ #
619
+ # class DeliverWebhookJob < ActiveJob::Base
620
+ # attr_writer :attempt_number
621
+ #
622
+ # def attempt_number
623
+ # @attempt_number ||= 0
624
+ # end
625
+ #
626
+ # def serialize
627
+ # super.merge('attempt_number' => attempt_number + 1)
628
+ # end
629
+ #
630
+ # def deserialize(job_data)
631
+ # super
632
+ # self.attempt_number = job_data['attempt_number']
633
+ # end
634
+ #
635
+ # rescue_from(Timeout::Error) do |exception|
636
+ # raise exception if attempt_number > 5
637
+ # retry_job(wait: 10)
638
+ # end
639
+ # end
640
+ #
641
+ # source://activejob//lib/active_job/core.rb#150
642
+ def deserialize(job_data); end
643
+
644
+ # Track any exceptions raised by the backend so callers can inspect the errors.
645
+ #
646
+ # source://activejob//lib/active_job/core.rb#56
647
+ def enqueue_error; end
648
+
649
+ # Track any exceptions raised by the backend so callers can inspect the errors.
650
+ #
651
+ # source://activejob//lib/active_job/core.rb#56
652
+ def enqueue_error=(_arg0); end
653
+
654
+ # Track when a job was enqueued
655
+ #
656
+ # source://activejob//lib/active_job/core.rb#46
657
+ def enqueued_at; end
658
+
659
+ # Track when a job was enqueued
660
+ #
661
+ # source://activejob//lib/active_job/core.rb#46
662
+ def enqueued_at=(_arg0); end
663
+
664
+ # Hash that contains the number of times this job handled errors for each specific retry_on declaration.
665
+ # Keys are the string representation of the exceptions listed in the retry_on declaration,
666
+ # while its associated value holds the number of executions where the corresponding retry_on
667
+ # declaration handled one of its listed exceptions.
668
+ #
669
+ # source://activejob//lib/active_job/core.rb#37
670
+ def exception_executions; end
671
+
672
+ # Hash that contains the number of times this job handled errors for each specific retry_on declaration.
673
+ # Keys are the string representation of the exceptions listed in the retry_on declaration,
674
+ # while its associated value holds the number of executions where the corresponding retry_on
675
+ # declaration handled one of its listed exceptions.
676
+ #
677
+ # source://activejob//lib/active_job/core.rb#37
678
+ def exception_executions=(_arg0); end
679
+
680
+ # Number of times this job has been executed (which increments on every retry, like after an exception).
681
+ #
682
+ # source://activejob//lib/active_job/core.rb#31
683
+ def executions; end
684
+
685
+ # Number of times this job has been executed (which increments on every retry, like after an exception).
686
+ #
687
+ # source://activejob//lib/active_job/core.rb#31
688
+ def executions=(_arg0); end
689
+
690
+ # Job Identifier
691
+ #
692
+ # source://activejob//lib/active_job/core.rb#19
693
+ def job_id; end
694
+
695
+ # Job Identifier
696
+ #
697
+ # source://activejob//lib/active_job/core.rb#19
698
+ def job_id=(_arg0); end
699
+
700
+ # I18n.locale to be used during the job.
701
+ #
702
+ # source://activejob//lib/active_job/core.rb#40
703
+ def locale; end
704
+
705
+ # I18n.locale to be used during the job.
706
+ #
707
+ # source://activejob//lib/active_job/core.rb#40
708
+ def locale=(_arg0); end
709
+
710
+ # Priority that the job will have (lower is more priority).
711
+ #
712
+ # source://activejob//lib/active_job/core.rb#25
713
+ def priority=(_arg0); end
714
+
715
+ # ID optionally provided by adapter
716
+ #
717
+ # source://activejob//lib/active_job/core.rb#28
718
+ def provider_job_id; end
719
+
720
+ # ID optionally provided by adapter
721
+ #
722
+ # source://activejob//lib/active_job/core.rb#28
723
+ def provider_job_id=(_arg0); end
724
+
725
+ # Queue in which the job will reside.
726
+ #
727
+ # source://activejob//lib/active_job/core.rb#22
728
+ def queue_name=(_arg0); end
729
+
730
+ # Time when the job should be performed
731
+ #
732
+ # source://activejob//lib/active_job/core.rb#16
733
+ def scheduled_at; end
734
+
735
+ # Time when the job should be performed
736
+ #
737
+ # source://activejob//lib/active_job/core.rb#16
738
+ def scheduled_at=(_arg0); end
739
+
740
+ # Returns a hash with the job data that can safely be passed to the
741
+ # queuing adapter.
742
+ #
743
+ # source://activejob//lib/active_job/core.rb#107
744
+ def serialize; end
745
+
746
+ # Sets the attribute serialized_arguments
747
+ #
748
+ # @param value the value to set the attribute serialized_arguments to.
749
+ #
750
+ # source://activejob//lib/active_job/core.rb#13
751
+ def serialized_arguments=(_arg0); end
752
+
753
+ # Configures the job with the given options.
754
+ #
755
+ # source://activejob//lib/active_job/core.rb#165
756
+ def set(options = T.unsafe(nil)); end
757
+
758
+ # Track whether the adapter received the job successfully.
759
+ #
760
+ # source://activejob//lib/active_job/core.rb#49
761
+ def successfully_enqueued=(_arg0); end
762
+
763
+ # @return [Boolean]
764
+ #
765
+ # source://activejob//lib/active_job/core.rb#51
766
+ def successfully_enqueued?; end
767
+
768
+ # Timezone to be used during the job.
769
+ #
770
+ # source://activejob//lib/active_job/core.rb#43
771
+ def timezone; end
772
+
773
+ # Timezone to be used during the job.
774
+ #
775
+ # source://activejob//lib/active_job/core.rb#43
776
+ def timezone=(_arg0); end
777
+
778
+ private
779
+
780
+ # @return [Boolean]
781
+ #
782
+ # source://activejob//lib/active_job/core.rb#198
783
+ def arguments_serialized?; end
784
+
785
+ # source://activejob//lib/active_job/core.rb#194
786
+ def deserialize_arguments(serialized_args); end
787
+
788
+ # source://activejob//lib/active_job/core.rb#183
789
+ def deserialize_arguments_if_needed; end
790
+
791
+ # source://activejob//lib/active_job/core.rb#190
792
+ def serialize_arguments(arguments); end
793
+
794
+ # source://activejob//lib/active_job/core.rb#175
795
+ def serialize_arguments_if_needed(arguments); end
796
+ end
797
+
798
+ # These methods will be included into any Active Job object, adding
799
+ # helpers for de/serialization and creation of job instances.
800
+ #
801
+ # source://activejob//lib/active_job/core.rb#60
802
+ module ActiveJob::Core::ClassMethods
803
+ # Creates a new job instance from a hash created with +serialize+
804
+ #
805
+ # source://activejob//lib/active_job/core.rb#62
806
+ def deserialize(job_data); end
807
+
808
+ # Creates a job preconfigured with the given options. You can call
809
+ # perform_later with the job arguments to enqueue the job with the
810
+ # preconfigured options
811
+ #
812
+ # ==== Options
813
+ # * <tt>:wait</tt> - Enqueues the job with the specified delay
814
+ # * <tt>:wait_until</tt> - Enqueues the job at the time specified
815
+ # * <tt>:queue</tt> - Enqueues the job on the specified queue
816
+ # * <tt>:priority</tt> - Enqueues the job with the specified priority
817
+ #
818
+ # ==== Examples
819
+ #
820
+ # VideoJob.set(queue: :some_queue).perform_later(Video.last)
821
+ # VideoJob.set(wait: 5.minutes).perform_later(Video.last)
822
+ # VideoJob.set(wait_until: Time.now.tomorrow).perform_later(Video.last)
823
+ # VideoJob.set(queue: :some_queue, wait: 5.minutes).perform_later(Video.last)
824
+ # VideoJob.set(queue: :some_queue, wait_until: Time.now.tomorrow).perform_later(Video.last)
825
+ # VideoJob.set(queue: :some_queue, wait: 5.minutes, priority: 10).perform_later(Video.last)
826
+ #
827
+ # source://activejob//lib/active_job/core.rb#86
828
+ def set(options = T.unsafe(nil)); end
829
+ end
830
+
831
+ # Raised when an exception is raised during job arguments deserialization.
832
+ #
833
+ # Wraps the original exception raised as +cause+.
834
+ #
835
+ # source://activejob//lib/active_job/arguments.rb#10
836
+ class ActiveJob::DeserializationError < ::StandardError
837
+ # @return [DeserializationError] a new instance of DeserializationError
838
+ #
839
+ # source://activejob//lib/active_job/arguments.rb#11
840
+ def initialize; end
841
+ end
842
+
843
+ # source://activejob//lib/active_job/enqueue_after_transaction_commit.rb#4
844
+ module ActiveJob::EnqueueAfterTransactionCommit
845
+ private
846
+
847
+ # source://activejob//lib/active_job/enqueue_after_transaction_commit.rb#6
848
+ def raw_enqueue; end
849
+ end
850
+
851
+ # Can be raised by adapters if they wish to communicate to the caller a reason
852
+ # why the adapter was unexpectedly unable to enqueue a job.
853
+ #
854
+ # source://activejob//lib/active_job/enqueuing.rb#8
855
+ class ActiveJob::EnqueueError < ::StandardError; end
856
+
857
+ # source://activejob//lib/active_job/enqueuing.rb#40
858
+ module ActiveJob::Enqueuing
859
+ extend ::ActiveSupport::Concern
860
+ include GeneratedInstanceMethods
861
+
862
+ mixes_in_class_methods GeneratedClassMethods
863
+ mixes_in_class_methods ::ActiveJob::Enqueuing::ClassMethods
864
+
865
+ # Enqueues the job to be performed by the queue adapter.
866
+ #
867
+ # ==== Options
868
+ # * <tt>:wait</tt> - Enqueues the job with the specified delay
869
+ # * <tt>:wait_until</tt> - Enqueues the job at the time specified
870
+ # * <tt>:queue</tt> - Enqueues the job on the specified queue
871
+ # * <tt>:priority</tt> - Enqueues the job with the specified priority
872
+ #
873
+ # ==== Examples
874
+ #
875
+ # my_job_instance.enqueue
876
+ # my_job_instance.enqueue wait: 5.minutes
877
+ # my_job_instance.enqueue queue: :important
878
+ # my_job_instance.enqueue wait_until: Date.tomorrow.midnight
879
+ # my_job_instance.enqueue priority: 10
880
+ #
881
+ # source://activejob//lib/active_job/enqueuing.rb#113
882
+ def enqueue(options = T.unsafe(nil)); end
883
+
884
+ private
885
+
886
+ # source://activejob//lib/active_job/enqueuing.rb#129
887
+ def raw_enqueue; end
888
+
889
+ module GeneratedClassMethods
890
+ def enqueue_after_transaction_commit; end
891
+ def enqueue_after_transaction_commit=(value); end
892
+ end
893
+
894
+ module GeneratedInstanceMethods; end
895
+ end
896
+
897
+ # Includes the +perform_later+ method for job initialization.
898
+ #
899
+ # source://activejob//lib/active_job/enqueuing.rb#58
900
+ module ActiveJob::Enqueuing::ClassMethods
901
+ # Push a job onto the queue. By default the arguments must be either String,
902
+ # Integer, Float, NilClass, TrueClass, FalseClass, BigDecimal, Symbol, Date,
903
+ # Time, DateTime, ActiveSupport::TimeWithZone, ActiveSupport::Duration,
904
+ # Hash, ActiveSupport::HashWithIndifferentAccess, Array, Range, or
905
+ # GlobalID::Identification instances, although this can be extended by adding
906
+ # custom serializers.
907
+ #
908
+ # Returns an instance of the job class queued with arguments available in
909
+ # Job#arguments or +false+ if the enqueue did not succeed.
910
+ #
911
+ # After the attempted enqueue, the job will be yielded to an optional block.
912
+ #
913
+ # If Active Job is used conjointly with Active Record, and #perform_later is called
914
+ # inside an Active Record transaction, then the enqueue is implicitly deferred to after
915
+ # the transaction is committed, or dropped if it's rolled back. In such case #perform_later
916
+ # will return the job instance like if it was successfully enqueued, but will still return
917
+ # +false+ if a callback prevented the job from being enqueued.
918
+ #
919
+ # This behavior can be changed on a per job basis:
920
+ #
921
+ # class NotificationJob < ApplicationJob
922
+ # self.enqueue_after_transaction_commit = false
923
+ # end
924
+ #
925
+ # @yield [job]
926
+ #
927
+ # source://activejob//lib/active_job/enqueuing.rb#82
928
+ def perform_later(*_arg0, **_arg1, &_arg2); end
929
+
930
+ private
931
+
932
+ # source://activejob//lib/active_job/enqueuing.rb#92
933
+ def job_or_instantiate(*args, **_arg1, &_); end
934
+ end
935
+
936
+ # Provides behavior for retrying and discarding jobs on exceptions.
937
+ #
938
+ # source://activejob//lib/active_job/exceptions.rb#7
939
+ module ActiveJob::Exceptions
940
+ extend ::ActiveSupport::Concern
941
+ include GeneratedInstanceMethods
942
+
943
+ mixes_in_class_methods GeneratedClassMethods
944
+ mixes_in_class_methods ::ActiveJob::Exceptions::ClassMethods
945
+
946
+ # Reschedules the job to be re-executed. This is useful in combination with
947
+ # {rescue_from}[rdoc-ref:ActiveSupport::Rescuable::ClassMethods#rescue_from].
948
+ # When you rescue an exception from your job you can ask Active Job to retry
949
+ # performing your job.
950
+ #
951
+ # ==== Options
952
+ # * <tt>:wait</tt> - Enqueues the job with the specified delay in seconds
953
+ # * <tt>:wait_until</tt> - Enqueues the job at the time specified
954
+ # * <tt>:queue</tt> - Enqueues the job on the specified queue
955
+ # * <tt>:priority</tt> - Enqueues the job with the specified priority
956
+ #
957
+ # ==== Examples
958
+ #
959
+ # class SiteScraperJob < ActiveJob::Base
960
+ # rescue_from(ErrorLoadingSite) do
961
+ # retry_job queue: :low_priority
962
+ # end
963
+ #
964
+ # def perform(*args)
965
+ # # raise ErrorLoadingSite if cannot scrape
966
+ # end
967
+ # end
968
+ #
969
+ # source://activejob//lib/active_job/exceptions.rb#151
970
+ def retry_job(options = T.unsafe(nil)); end
971
+
972
+ private
973
+
974
+ # source://activejob//lib/active_job/exceptions.rb#161
975
+ def determine_delay(seconds_or_duration_or_algorithm:, executions:, jitter: T.unsafe(nil)); end
976
+
977
+ # source://activejob//lib/active_job/exceptions.rb#182
978
+ def determine_jitter_for_delay(delay, jitter); end
979
+
980
+ # source://activejob//lib/active_job/exceptions.rb#187
981
+ def executions_for(exceptions); end
982
+
983
+ # source://activejob//lib/active_job/exceptions.rb#196
984
+ def run_after_discard_procs(exception); end
985
+
986
+ module GeneratedClassMethods
987
+ def after_discard_procs; end
988
+ def after_discard_procs=(value); end
989
+ def after_discard_procs?; end
990
+ def retry_jitter; end
991
+ def retry_jitter=(value); end
992
+ end
993
+
994
+ module GeneratedInstanceMethods
995
+ def after_discard_procs; end
996
+ def after_discard_procs=(value); end
997
+ def after_discard_procs?; end
998
+ end
999
+ end
1000
+
1001
+ # source://activejob//lib/active_job/exceptions.rb#15
1002
+ module ActiveJob::Exceptions::ClassMethods
1003
+ # A block to run when a job is about to be discarded for any reason.
1004
+ #
1005
+ # ==== Example
1006
+ #
1007
+ # class WorkJob < ActiveJob::Base
1008
+ # after_discard do |job, exception|
1009
+ # ExceptionNotifier.report(exception)
1010
+ # end
1011
+ #
1012
+ # ...
1013
+ #
1014
+ # end
1015
+ #
1016
+ # source://activejob//lib/active_job/exceptions.rb#124
1017
+ def after_discard(&blk); end
1018
+
1019
+ # Discard the job with no attempts to retry, if the exception is raised. This is useful when the subject of the job,
1020
+ # like an Active Record, is no longer available, and the job is thus no longer relevant.
1021
+ #
1022
+ # You can also pass a block that'll be invoked. This block is yielded with the job instance as the first and the error instance as the second parameter.
1023
+ #
1024
+ # +retry_on+ and +discard_on+ handlers are searched from bottom to top, and up the class hierarchy. The handler of the first class for
1025
+ # which <tt>exception.is_a?(klass)</tt> holds true is the one invoked, if any.
1026
+ #
1027
+ # ==== Example
1028
+ #
1029
+ # class SearchIndexingJob < ActiveJob::Base
1030
+ # discard_on ActiveJob::DeserializationError
1031
+ # discard_on(CustomAppException) do |job, error|
1032
+ # ExceptionNotifier.caught(error)
1033
+ # end
1034
+ #
1035
+ # def perform(record)
1036
+ # # Will raise ActiveJob::DeserializationError if the record can't be deserialized
1037
+ # # Might raise CustomAppException for something domain specific
1038
+ # end
1039
+ # end
1040
+ #
1041
+ # source://activejob//lib/active_job/exceptions.rb#103
1042
+ def discard_on(*exceptions); end
1043
+
1044
+ # Catch the exception and reschedule job for re-execution after so many seconds, for a specific number of attempts.
1045
+ # If the exception keeps getting raised beyond the specified number of attempts, the exception is allowed to
1046
+ # bubble up to the underlying queuing system, which may have its own retry mechanism or place it in a
1047
+ # holding queue for inspection.
1048
+ #
1049
+ # You can also pass a block that'll be invoked if the retry attempts fail for custom logic rather than letting
1050
+ # the exception bubble up. This block is yielded with the job instance as the first and the error instance as the second parameter.
1051
+ #
1052
+ # +retry_on+ and +discard_on+ handlers are searched from bottom to top, and up the class hierarchy. The handler of the first class for
1053
+ # which <tt>exception.is_a?(klass)</tt> holds true is the one invoked, if any.
1054
+ #
1055
+ # ==== Options
1056
+ # * <tt>:wait</tt> - Re-enqueues the job with a delay specified either in seconds (default: 3 seconds),
1057
+ # as a computing proc that takes the number of executions so far as an argument, or as a symbol reference of
1058
+ # <tt>:polynomially_longer</tt>, which applies the wait algorithm of <tt>((executions**4) + (Kernel.rand * (executions**4) * jitter)) + 2</tt>
1059
+ # (first wait ~3s, then ~18s, then ~83s, etc)
1060
+ # * <tt>:attempts</tt> - Enqueues the job the specified number of times (default: 5 attempts) or a symbol reference of <tt>:unlimited</tt>
1061
+ # to retry the job until it succeeds. The number of attempts includes the original job execution.
1062
+ # * <tt>:queue</tt> - Re-enqueues the job on a different queue
1063
+ # * <tt>:priority</tt> - Re-enqueues the job with a different priority
1064
+ # * <tt>:jitter</tt> - A random delay of wait time used when calculating backoff. The default is 15% (0.15) which represents the upper bound of possible wait time (expressed as a percentage)
1065
+ #
1066
+ # ==== Examples
1067
+ #
1068
+ # class RemoteServiceJob < ActiveJob::Base
1069
+ # retry_on CustomAppException # defaults to ~3s wait, 5 attempts
1070
+ # retry_on AnotherCustomAppException, wait: ->(executions) { executions * 2 }
1071
+ # retry_on CustomInfrastructureException, wait: 5.minutes, attempts: :unlimited
1072
+ #
1073
+ # retry_on ActiveRecord::Deadlocked, wait: 5.seconds, attempts: 3
1074
+ # retry_on Net::OpenTimeout, Timeout::Error, wait: :polynomially_longer, attempts: 10 # retries at most 10 times for Net::OpenTimeout and Timeout::Error combined
1075
+ # # To retry at most 10 times for each individual exception:
1076
+ # # retry_on Net::OpenTimeout, wait: :polynomially_longer, attempts: 10
1077
+ # # retry_on Net::ReadTimeout, wait: 5.seconds, jitter: 0.30, attempts: 10
1078
+ # # retry_on Timeout::Error, wait: :polynomially_longer, attempts: 10
1079
+ #
1080
+ # retry_on(YetAnotherCustomAppException) do |job, error|
1081
+ # ExceptionNotifier.caught(error)
1082
+ # end
1083
+ #
1084
+ # def perform(*args)
1085
+ # # Might raise CustomAppException, AnotherCustomAppException, or YetAnotherCustomAppException for something domain specific
1086
+ # # Might raise ActiveRecord::Deadlocked when a local db deadlock is detected
1087
+ # # Might raise Net::OpenTimeout or Timeout::Error when the remote service is down
1088
+ # end
1089
+ # end
1090
+ #
1091
+ # source://activejob//lib/active_job/exceptions.rb#62
1092
+ def retry_on(*exceptions, wait: T.unsafe(nil), attempts: T.unsafe(nil), queue: T.unsafe(nil), priority: T.unsafe(nil), jitter: T.unsafe(nil)); end
1093
+ end
1094
+
1095
+ # source://activejob//lib/active_job/exceptions.rb#158
1096
+ ActiveJob::Exceptions::JITTER_DEFAULT = T.let(T.unsafe(nil), Object)
1097
+
1098
+ # = Active Job \Execution
1099
+ #
1100
+ # Provides methods to execute jobs immediately, and wraps job execution so
1101
+ # that exceptions configured with
1102
+ # {rescue_from}[rdoc-ref:ActiveSupport::Rescuable::ClassMethods#rescue_from]
1103
+ # are handled.
1104
+ #
1105
+ # source://activejob//lib/active_job/execution.rb#12
1106
+ module ActiveJob::Execution
1107
+ extend ::ActiveSupport::Concern
1108
+ include GeneratedInstanceMethods
1109
+ include ::ActiveSupport::Rescuable
1110
+
1111
+ mixes_in_class_methods GeneratedClassMethods
1112
+ mixes_in_class_methods ::ActiveSupport::Rescuable::ClassMethods
1113
+ mixes_in_class_methods ::ActiveJob::Execution::ClassMethods
1114
+
1115
+ # source://activejob//lib/active_job/execution.rb#60
1116
+ def perform(*_arg0); end
1117
+
1118
+ # Performs the job immediately. The job is not sent to the queuing adapter
1119
+ # but directly executed by blocking the execution of others until it's finished.
1120
+ # +perform_now+ returns the value of your job's +perform+ method.
1121
+ #
1122
+ # class MyJob < ActiveJob::Base
1123
+ # def perform
1124
+ # "Hello World!"
1125
+ # end
1126
+ # end
1127
+ #
1128
+ # puts MyJob.new(*args).perform_now # => "Hello World!"
1129
+ #
1130
+ # source://activejob//lib/active_job/execution.rb#45
1131
+ def perform_now; end
1132
+
1133
+ private
1134
+
1135
+ # source://activejob//lib/active_job/execution.rb#65
1136
+ def _perform_job; end
1137
+
1138
+ module GeneratedClassMethods
1139
+ def rescue_handlers; end
1140
+ def rescue_handlers=(value); end
1141
+ def rescue_handlers?; end
1142
+ end
1143
+
1144
+ module GeneratedInstanceMethods
1145
+ def rescue_handlers; end
1146
+ def rescue_handlers=(value); end
1147
+ def rescue_handlers?; end
1148
+ end
1149
+ end
1150
+
1151
+ # Includes methods for executing and performing jobs instantly.
1152
+ #
1153
+ # source://activejob//lib/active_job/execution.rb#17
1154
+ module ActiveJob::Execution::ClassMethods
1155
+ # source://activejob//lib/active_job/execution.rb#26
1156
+ def execute(job_data); end
1157
+
1158
+ # Performs the job immediately.
1159
+ #
1160
+ # MyJob.perform_now("mike")
1161
+ #
1162
+ # source://activejob//lib/active_job/execution.rb#22
1163
+ def perform_now(*_arg0, **_arg1, &_arg2); end
1164
+ end
1165
+
1166
+ # source://activejob//lib/active_job/instrumentation.rb#16
1167
+ module ActiveJob::Instrumentation
1168
+ extend ::ActiveSupport::Concern
1169
+
1170
+ # source://activejob//lib/active_job/instrumentation.rb#25
1171
+ def perform_now; end
1172
+
1173
+ private
1174
+
1175
+ # source://activejob//lib/active_job/instrumentation.rb#30
1176
+ def _perform_job; end
1177
+
1178
+ # source://activejob//lib/active_job/instrumentation.rb#47
1179
+ def halted_callback_hook(*_arg0); end
1180
+
1181
+ # source://activejob//lib/active_job/instrumentation.rb#35
1182
+ def instrument(operation, payload = T.unsafe(nil), &block); end
1183
+ end
1184
+
1185
+ # source://activejob//lib/active_job/log_subscriber.rb#6
1186
+ class ActiveJob::LogSubscriber < ::ActiveSupport::LogSubscriber
1187
+ # source://activejob//lib/active_job/log_subscriber.rb#7
1188
+ def backtrace_cleaner; end
1189
+
1190
+ # source://activejob//lib/active_job/log_subscriber.rb#7
1191
+ def backtrace_cleaner=(_arg0); end
1192
+
1193
+ # source://activejob//lib/active_job/log_subscriber.rb#7
1194
+ def backtrace_cleaner?; end
1195
+
1196
+ # source://activejob//lib/active_job/log_subscriber.rb#130
1197
+ def discard(event); end
1198
+
1199
+ # source://activejob//lib/active_job/log_subscriber.rb#9
1200
+ def enqueue(event); end
1201
+
1202
+ # source://activejob//lib/active_job/log_subscriber.rb#49
1203
+ def enqueue_all(event); end
1204
+
1205
+ # source://activejob//lib/active_job/log_subscriber.rb#29
1206
+ def enqueue_at(event); end
1207
+
1208
+ # source://activejob//lib/active_job/log_subscriber.rb#105
1209
+ def enqueue_retry(event); end
1210
+
1211
+ # source://activejob//lib/active_job/log_subscriber.rb#86
1212
+ def perform(event); end
1213
+
1214
+ # source://activejob//lib/active_job/log_subscriber.rb#76
1215
+ def perform_start(event); end
1216
+
1217
+ # source://activejob//lib/active_job/log_subscriber.rb#120
1218
+ def retry_stopped(event); end
1219
+
1220
+ private
1221
+
1222
+ # source://activejob//lib/active_job/log_subscriber.rb#145
1223
+ def args_info(job); end
1224
+
1225
+ # source://activejob//lib/active_job/log_subscriber.rb#203
1226
+ def enqueued_jobs_message(adapter, enqueued_jobs); end
1227
+
1228
+ # source://activejob//lib/active_job/log_subscriber.rb#183
1229
+ def error(progname = T.unsafe(nil), &block); end
1230
+
1231
+ # source://activejob//lib/active_job/log_subscriber.rb#199
1232
+ def extract_enqueue_source_location(locations); end
1233
+
1234
+ # source://activejob//lib/active_job/log_subscriber.rb#154
1235
+ def format(arg); end
1236
+
1237
+ # source://activejob//lib/active_job/log_subscriber.rb#175
1238
+ def info(progname = T.unsafe(nil), &block); end
1239
+
1240
+ # source://activejob//lib/active_job/log_subscriber.rb#191
1241
+ def log_enqueue_source; end
1242
+
1243
+ # source://activejob//lib/active_job/log_subscriber.rb#171
1244
+ def logger; end
1245
+
1246
+ # source://activejob//lib/active_job/log_subscriber.rb#141
1247
+ def queue_name(event); end
1248
+
1249
+ # source://activejob//lib/active_job/log_subscriber.rb#167
1250
+ def scheduled_at(event); end
1251
+
1252
+ class << self
1253
+ # source://activejob//lib/active_job/log_subscriber.rb#7
1254
+ def backtrace_cleaner; end
1255
+
1256
+ # source://activejob//lib/active_job/log_subscriber.rb#7
1257
+ def backtrace_cleaner=(value); end
1258
+
1259
+ # source://activejob//lib/active_job/log_subscriber.rb#7
1260
+ def backtrace_cleaner?; end
1261
+
1262
+ # source://activesupport/7.2.1/lib/active_support/log_subscriber.rb#84
1263
+ def log_levels; end
1264
+ end
1265
+ end
1266
+
1267
+ # source://activejob//lib/active_job/logging.rb#7
1268
+ module ActiveJob::Logging
1269
+ extend ::ActiveSupport::Concern
1270
+ include GeneratedInstanceMethods
1271
+
1272
+ mixes_in_class_methods GeneratedClassMethods
1273
+
1274
+ # source://activejob//lib/active_job/logging.rb#31
1275
+ def perform_now; end
1276
+
1277
+ private
1278
+
1279
+ # @return [Boolean]
1280
+ #
1281
+ # source://activejob//lib/active_job/logging.rb#45
1282
+ def logger_tagged_by_active_job?; end
1283
+
1284
+ # source://activejob//lib/active_job/logging.rb#36
1285
+ def tag_logger(*tags, &block); end
1286
+
1287
+ module GeneratedClassMethods
1288
+ def log_arguments; end
1289
+ def log_arguments=(value); end
1290
+ def log_arguments?; end
1291
+ end
1292
+
1293
+ module GeneratedInstanceMethods; end
1294
+ end
1295
+
1296
+ # = Active Job Queue adapter
1297
+ #
1298
+ # The +ActiveJob::QueueAdapter+ module is used to load the
1299
+ # correct adapter. The default queue adapter is +:async+,
1300
+ # which loads the ActiveJob::QueueAdapters::AsyncAdapter.
1301
+ #
1302
+ # source://activejob//lib/active_job/queue_adapter.rb#20
1303
+ module ActiveJob::QueueAdapter
1304
+ extend ::ActiveSupport::Concern
1305
+ include GeneratedInstanceMethods
1306
+
1307
+ mixes_in_class_methods GeneratedClassMethods
1308
+ mixes_in_class_methods ::ActiveJob::QueueAdapter::ClassMethods
1309
+
1310
+ module GeneratedClassMethods
1311
+ def _queue_adapter; end
1312
+ def _queue_adapter=(value); end
1313
+ def _queue_adapter_name; end
1314
+ def _queue_adapter_name=(value); end
1315
+ end
1316
+
1317
+ module GeneratedInstanceMethods; end
1318
+ end
1319
+
1320
+ # Includes the setter method for changing the active queue adapter.
1321
+ #
1322
+ # source://activejob//lib/active_job/queue_adapter.rb#31
1323
+ module ActiveJob::QueueAdapter::ClassMethods
1324
+ # Returns the backend queue provider. The default queue adapter
1325
+ # is +:async+. See QueueAdapters for more information.
1326
+ #
1327
+ # source://activejob//lib/active_job/queue_adapter.rb#34
1328
+ def queue_adapter; end
1329
+
1330
+ # Specify the backend queue provider. The default queue adapter
1331
+ # is the +:async+ queue. See QueueAdapters for more
1332
+ # information.
1333
+ #
1334
+ # source://activejob//lib/active_job/queue_adapter.rb#49
1335
+ def queue_adapter=(name_or_adapter); end
1336
+
1337
+ # Returns string denoting the name of the configured queue adapter.
1338
+ # By default returns <tt>"async"</tt>.
1339
+ #
1340
+ # source://activejob//lib/active_job/queue_adapter.rb#41
1341
+ def queue_adapter_name; end
1342
+
1343
+ private
1344
+
1345
+ # source://activejob//lib/active_job/queue_adapter.rb#65
1346
+ def assign_adapter(adapter_name, queue_adapter); end
1347
+
1348
+ # @return [Boolean]
1349
+ #
1350
+ # source://activejob//lib/active_job/queue_adapter.rb#72
1351
+ def queue_adapter?(object); end
1352
+ end
1353
+
1354
+ # source://activejob//lib/active_job/queue_adapter.rb#70
1355
+ ActiveJob::QueueAdapter::ClassMethods::QUEUE_ADAPTER_METHODS = T.let(T.unsafe(nil), Array)
1356
+
1357
+ # = Active Job adapters
1358
+ #
1359
+ # Active Job has adapters for the following queuing backends:
1360
+ #
1361
+ # * {Backburner}[https://github.com/nesquena/backburner]
1362
+ # * {Delayed Job}[https://github.com/collectiveidea/delayed_job]
1363
+ # * {Que}[https://github.com/chanks/que]
1364
+ # * {queue_classic}[https://github.com/QueueClassic/queue_classic]
1365
+ # * {Resque}[https://github.com/resque/resque]
1366
+ # * {Sidekiq}[https://sidekiq.org]
1367
+ # * {Sneakers}[https://github.com/jondot/sneakers]
1368
+ # * {Sucker Punch}[https://github.com/brandonhilkert/sucker_punch]
1369
+ # * Please Note: We are not accepting pull requests for new adapters. See the {README}[link:files/activejob/README_md.html] for more details.
1370
+ #
1371
+ # For testing and development Active Job has three built-in adapters:
1372
+ #
1373
+ # * {Active Job Async}[https://api.rubyonrails.org/classes/ActiveJob/QueueAdapters/AsyncAdapter.html]
1374
+ # * {Active Job Inline}[https://api.rubyonrails.org/classes/ActiveJob/QueueAdapters/InlineAdapter.html]
1375
+ # * {Active Job Test}[https://api.rubyonrails.org/classes/ActiveJob/QueueAdapters/TestAdapter.html]
1376
+ #
1377
+ # === Backends Features
1378
+ #
1379
+ # | | Async | Queues | Delayed | Priorities | Timeout | Retries |
1380
+ # |-------------------|-------|--------|------------|------------|---------|---------|
1381
+ # | Backburner | Yes | Yes | Yes | Yes | Job | Global |
1382
+ # | Delayed Job | Yes | Yes | Yes | Job | Global | Global |
1383
+ # | Que | Yes | Yes | Yes | Job | No | Job |
1384
+ # | queue_classic | Yes | Yes | Yes* | No | No | No |
1385
+ # | Resque | Yes | Yes | Yes (Gem) | Queue | Global | Yes |
1386
+ # | Sidekiq | Yes | Yes | Yes | Queue | No | Job |
1387
+ # | Sneakers | Yes | Yes | No | Queue | Queue | No |
1388
+ # | Sucker Punch | Yes | Yes | Yes | No | No | No |
1389
+ # | Active Job Async | Yes | Yes | Yes | No | No | No |
1390
+ # | Active Job Inline | No | Yes | N/A | N/A | N/A | N/A |
1391
+ # | Active Job Test | No | Yes | N/A | N/A | N/A | N/A |
1392
+ #
1393
+ # ==== Async
1394
+ #
1395
+ # Yes: The Queue Adapter has the ability to run the job in a non-blocking manner.
1396
+ # It either runs on a separate or forked process, or on a different thread.
1397
+ #
1398
+ # No: The job is run in the same process.
1399
+ #
1400
+ # ==== Queues
1401
+ #
1402
+ # Yes: Jobs may set which queue they are run in with queue_as or by using the set
1403
+ # method.
1404
+ #
1405
+ # ==== Delayed
1406
+ #
1407
+ # Yes: The adapter will run the job in the future through perform_later.
1408
+ #
1409
+ # (Gem): An additional gem is required to use perform_later with this adapter.
1410
+ #
1411
+ # No: The adapter will run jobs at the next opportunity and cannot use perform_later.
1412
+ #
1413
+ # N/A: The adapter does not support queuing.
1414
+ #
1415
+ # NOTE:
1416
+ # queue_classic supports job scheduling since version 3.1.
1417
+ # For older versions you can use the queue_classic-later gem.
1418
+ #
1419
+ # ==== Priorities
1420
+ #
1421
+ # The order in which jobs are processed can be configured differently depending
1422
+ # on the adapter.
1423
+ #
1424
+ # Job: Any class inheriting from the adapter may set the priority on the job
1425
+ # object relative to other jobs.
1426
+ #
1427
+ # Queue: The adapter can set the priority for job queues, when setting a queue
1428
+ # with Active Job this will be respected.
1429
+ #
1430
+ # Yes: Allows the priority to be set on the job object, at the queue level or
1431
+ # as default configuration option.
1432
+ #
1433
+ # No: The adapter does not allow the priority of jobs to be configured.
1434
+ #
1435
+ # N/A: The adapter does not support queuing, and therefore sorting them.
1436
+ #
1437
+ # ==== Timeout
1438
+ #
1439
+ # When a job will stop after the allotted time.
1440
+ #
1441
+ # Job: The timeout can be set for each instance of the job class.
1442
+ #
1443
+ # Queue: The timeout is set for all jobs on the queue.
1444
+ #
1445
+ # Global: The adapter is configured that all jobs have a maximum run time.
1446
+ #
1447
+ # No: The adapter does not allow the timeout of jobs to be configured.
1448
+ #
1449
+ # N/A: This adapter does not run in a separate process, and therefore timeout
1450
+ # is unsupported.
1451
+ #
1452
+ # ==== Retries
1453
+ #
1454
+ # Job: The number of retries can be set per instance of the job class.
1455
+ #
1456
+ # Yes: The Number of retries can be configured globally, for each instance or
1457
+ # on the queue. This adapter may also present failed instances of the job class
1458
+ # that can be restarted.
1459
+ #
1460
+ # Global: The adapter has a global number of retries.
1461
+ #
1462
+ # No: The adapter does not allow the number of retries to be configured.
1463
+ #
1464
+ # N/A: The adapter does not run in a separate process, and therefore doesn't
1465
+ # support retries.
1466
+ #
1467
+ # source://activejob//lib/active_job/queue_adapters.rb#114
1468
+ module ActiveJob::QueueAdapters
1469
+ extend ::ActiveSupport::Autoload
1470
+
1471
+ class << self
1472
+ # Returns adapter for specified name.
1473
+ #
1474
+ # ActiveJob::QueueAdapters.lookup(:sidekiq)
1475
+ # # => ActiveJob::QueueAdapters::SidekiqAdapter
1476
+ #
1477
+ # source://activejob//lib/active_job/queue_adapters.rb#138
1478
+ def lookup(name); end
1479
+ end
1480
+ end
1481
+
1482
+ # source://activejob//lib/active_job/queue_adapters.rb#130
1483
+ ActiveJob::QueueAdapters::ADAPTER = T.let(T.unsafe(nil), String)
1484
+
1485
+ # = Active Job Abstract Adapter
1486
+ #
1487
+ # Active Job supports multiple job queue systems. ActiveJob::QueueAdapters::AbstractAdapter
1488
+ # forms the abstraction layer which makes this possible.
1489
+ #
1490
+ # source://activejob//lib/active_job/queue_adapters/abstract_adapter.rb#9
1491
+ class ActiveJob::QueueAdapters::AbstractAdapter
1492
+ # @raise [NotImplementedError]
1493
+ #
1494
+ # source://activejob//lib/active_job/queue_adapters/abstract_adapter.rb#18
1495
+ def enqueue(job); end
1496
+
1497
+ # Defines whether enqueuing should happen implicitly to after commit when called
1498
+ # from inside a transaction. Most adapters should return true, but some adapters
1499
+ # that use the same database as Active Record and are transaction aware can return
1500
+ # false to continue enqueuing jobs as part of the transaction.
1501
+ #
1502
+ # @return [Boolean]
1503
+ #
1504
+ # source://activejob//lib/active_job/queue_adapters/abstract_adapter.rb#14
1505
+ def enqueue_after_transaction_commit?; end
1506
+
1507
+ # @raise [NotImplementedError]
1508
+ #
1509
+ # source://activejob//lib/active_job/queue_adapters/abstract_adapter.rb#22
1510
+ def enqueue_at(job, timestamp); end
1511
+ end
1512
+
1513
+ # = Active Job Async adapter
1514
+ #
1515
+ # The Async adapter runs jobs with an in-process thread pool.
1516
+ #
1517
+ # This is the default queue adapter. It's well-suited for dev/test since
1518
+ # it doesn't need an external infrastructure, but it's a poor fit for
1519
+ # production since it drops pending jobs on restart.
1520
+ #
1521
+ # To use this adapter, set queue adapter to +:async+:
1522
+ #
1523
+ # config.active_job.queue_adapter = :async
1524
+ #
1525
+ # To configure the adapter's thread pool, instantiate the adapter and
1526
+ # pass your own config:
1527
+ #
1528
+ # config.active_job.queue_adapter = ActiveJob::QueueAdapters::AsyncAdapter.new \
1529
+ # min_threads: 1,
1530
+ # max_threads: 2 * Concurrent.processor_count,
1531
+ # idletime: 600.seconds
1532
+ #
1533
+ # The adapter uses a {Concurrent Ruby}[https://github.com/ruby-concurrency/concurrent-ruby] thread pool to schedule and execute
1534
+ # jobs. Since jobs share a single thread pool, long-running jobs will block
1535
+ # short-lived jobs. Fine for dev/test; bad for production.
1536
+ #
1537
+ # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#33
1538
+ class ActiveJob::QueueAdapters::AsyncAdapter < ::ActiveJob::QueueAdapters::AbstractAdapter
1539
+ # See {Concurrent::ThreadPoolExecutor}[https://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/ThreadPoolExecutor.html] for executor options.
1540
+ #
1541
+ # @return [AsyncAdapter] a new instance of AsyncAdapter
1542
+ #
1543
+ # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#35
1544
+ def initialize(**executor_options); end
1545
+
1546
+ # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#39
1547
+ def enqueue(job); end
1548
+
1549
+ # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#43
1550
+ def enqueue_at(job, timestamp); end
1551
+
1552
+ # Used for our test suite.
1553
+ #
1554
+ # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#55
1555
+ def immediate=(immediate); end
1556
+
1557
+ # Gracefully stop processing jobs. Finishes in-progress work and handles
1558
+ # any new jobs following the executor's fallback policy (`caller_runs`).
1559
+ # Waits for termination by default. Pass `wait: false` to continue.
1560
+ #
1561
+ # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#50
1562
+ def shutdown(wait: T.unsafe(nil)); end
1563
+ end
1564
+
1565
+ # Note that we don't actually need to serialize the jobs since we're
1566
+ # performing them in-process, but we do so anyway for parity with other
1567
+ # adapters and deployment environments. Otherwise, serialization bugs
1568
+ # may creep in undetected.
1569
+ #
1570
+ # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#63
1571
+ class ActiveJob::QueueAdapters::AsyncAdapter::JobWrapper
1572
+ # @return [JobWrapper] a new instance of JobWrapper
1573
+ #
1574
+ # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#64
1575
+ def initialize(job); end
1576
+
1577
+ # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#69
1578
+ def perform; end
1579
+ end
1580
+
1581
+ # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#74
1582
+ class ActiveJob::QueueAdapters::AsyncAdapter::Scheduler
1583
+ # @return [Scheduler] a new instance of Scheduler
1584
+ #
1585
+ # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#86
1586
+ def initialize(**options); end
1587
+
1588
+ # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#92
1589
+ def enqueue(job, queue_name:); end
1590
+
1591
+ # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#96
1592
+ def enqueue_at(job, timestamp, queue_name:); end
1593
+
1594
+ # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#110
1595
+ def executor; end
1596
+
1597
+ # Returns the value of attribute immediate.
1598
+ #
1599
+ # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#84
1600
+ def immediate; end
1601
+
1602
+ # Sets the attribute immediate
1603
+ #
1604
+ # @param value the value to set the attribute immediate to.
1605
+ #
1606
+ # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#84
1607
+ def immediate=(_arg0); end
1608
+
1609
+ # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#105
1610
+ def shutdown(wait: T.unsafe(nil)); end
1611
+ end
1612
+
1613
+ # source://activejob//lib/active_job/queue_adapters/async_adapter.rb#75
1614
+ ActiveJob::QueueAdapters::AsyncAdapter::Scheduler::DEFAULT_EXECUTOR_OPTIONS = T.let(T.unsafe(nil), Hash)
1615
+
1616
+ # = Active Job Inline adapter
1617
+ #
1618
+ # When enqueuing jobs with the Inline adapter the job will be executed
1619
+ # immediately.
1620
+ #
1621
+ # To use the Inline set the queue_adapter config to +:inline+.
1622
+ #
1623
+ # Rails.application.config.active_job.queue_adapter = :inline
1624
+ #
1625
+ # source://activejob//lib/active_job/queue_adapters/inline_adapter.rb#13
1626
+ class ActiveJob::QueueAdapters::InlineAdapter < ::ActiveJob::QueueAdapters::AbstractAdapter
1627
+ # source://activejob//lib/active_job/queue_adapters/inline_adapter.rb#18
1628
+ def enqueue(job); end
1629
+
1630
+ # @return [Boolean]
1631
+ #
1632
+ # source://activejob//lib/active_job/queue_adapters/inline_adapter.rb#14
1633
+ def enqueue_after_transaction_commit?; end
1634
+
1635
+ # @raise [NotImplementedError]
1636
+ #
1637
+ # source://activejob//lib/active_job/queue_adapters/inline_adapter.rb#22
1638
+ def enqueue_at(*_arg0); end
1639
+ end
1640
+
1641
+ # = Test adapter for Active Job
1642
+ #
1643
+ # The test adapter should be used only in testing. Along with
1644
+ # ActiveJob::TestCase and ActiveJob::TestHelper
1645
+ # it makes a great tool to test your \Rails application.
1646
+ #
1647
+ # To use the test adapter set +queue_adapter+ config to +:test+.
1648
+ #
1649
+ # Rails.application.config.active_job.queue_adapter = :test
1650
+ #
1651
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#14
1652
+ class ActiveJob::QueueAdapters::TestAdapter < ::ActiveJob::QueueAdapters::AbstractAdapter
1653
+ # @return [TestAdapter] a new instance of TestAdapter
1654
+ #
1655
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#18
1656
+ def initialize(enqueue_after_transaction_commit: T.unsafe(nil)); end
1657
+
1658
+ # Returns the value of attribute at.
1659
+ #
1660
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15
1661
+ def at; end
1662
+
1663
+ # Sets the attribute at
1664
+ #
1665
+ # @param value the value to set the attribute at to.
1666
+ #
1667
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15
1668
+ def at=(_arg0); end
1669
+
1670
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#36
1671
+ def enqueue(job); end
1672
+
1673
+ # Returns the value of attribute enqueue_after_transaction_commit.
1674
+ #
1675
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15
1676
+ def enqueue_after_transaction_commit; end
1677
+
1678
+ # Sets the attribute enqueue_after_transaction_commit
1679
+ #
1680
+ # @param value the value to set the attribute enqueue_after_transaction_commit to.
1681
+ #
1682
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15
1683
+ def enqueue_after_transaction_commit=(_arg0); end
1684
+
1685
+ # @return [Boolean]
1686
+ #
1687
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#22
1688
+ def enqueue_after_transaction_commit?; end
1689
+
1690
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#41
1691
+ def enqueue_at(job, timestamp); end
1692
+
1693
+ # Provides a store of all the enqueued jobs with the TestAdapter so you can check them.
1694
+ #
1695
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#27
1696
+ def enqueued_jobs; end
1697
+
1698
+ # Sets the attribute enqueued_jobs
1699
+ #
1700
+ # @param value the value to set the attribute enqueued_jobs to.
1701
+ #
1702
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#16
1703
+ def enqueued_jobs=(_arg0); end
1704
+
1705
+ # Returns the value of attribute filter.
1706
+ #
1707
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15
1708
+ def filter; end
1709
+
1710
+ # Sets the attribute filter
1711
+ #
1712
+ # @param value the value to set the attribute filter to.
1713
+ #
1714
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15
1715
+ def filter=(_arg0); end
1716
+
1717
+ # Returns the value of attribute perform_enqueued_at_jobs.
1718
+ #
1719
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15
1720
+ def perform_enqueued_at_jobs; end
1721
+
1722
+ # Sets the attribute perform_enqueued_at_jobs
1723
+ #
1724
+ # @param value the value to set the attribute perform_enqueued_at_jobs to.
1725
+ #
1726
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15
1727
+ def perform_enqueued_at_jobs=(_arg0); end
1728
+
1729
+ # Returns the value of attribute perform_enqueued_jobs.
1730
+ #
1731
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15
1732
+ def perform_enqueued_jobs; end
1733
+
1734
+ # Sets the attribute perform_enqueued_jobs
1735
+ #
1736
+ # @param value the value to set the attribute perform_enqueued_jobs to.
1737
+ #
1738
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15
1739
+ def perform_enqueued_jobs=(_arg0); end
1740
+
1741
+ # Provides a store of all the performed jobs with the TestAdapter so you can check them.
1742
+ #
1743
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#32
1744
+ def performed_jobs; end
1745
+
1746
+ # Sets the attribute performed_jobs
1747
+ #
1748
+ # @param value the value to set the attribute performed_jobs to.
1749
+ #
1750
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#16
1751
+ def performed_jobs=(_arg0); end
1752
+
1753
+ # Returns the value of attribute queue.
1754
+ #
1755
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15
1756
+ def queue; end
1757
+
1758
+ # Sets the attribute queue
1759
+ #
1760
+ # @param value the value to set the attribute queue to.
1761
+ #
1762
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15
1763
+ def queue=(_arg0); end
1764
+
1765
+ # Returns the value of attribute reject.
1766
+ #
1767
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15
1768
+ def reject; end
1769
+
1770
+ # Sets the attribute reject
1771
+ #
1772
+ # @param value the value to set the attribute reject to.
1773
+ #
1774
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15
1775
+ def reject=(_arg0); end
1776
+
1777
+ private
1778
+
1779
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#87
1780
+ def filter_as_proc(filter); end
1781
+
1782
+ # @return [Boolean]
1783
+ #
1784
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#65
1785
+ def filtered?(job); end
1786
+
1787
+ # @return [Boolean]
1788
+ #
1789
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#79
1790
+ def filtered_job_class?(job); end
1791
+
1792
+ # @return [Boolean]
1793
+ #
1794
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#73
1795
+ def filtered_queue?(job); end
1796
+
1797
+ # @return [Boolean]
1798
+ #
1799
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#69
1800
+ def filtered_time?(job); end
1801
+
1802
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#47
1803
+ def job_to_hash(job, extras = T.unsafe(nil)); end
1804
+
1805
+ # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#56
1806
+ def perform_or_enqueue(perform, job, job_data); end
1807
+ end
1808
+
1809
+ # source://activejob//lib/active_job/queue_name.rb#4
1810
+ module ActiveJob::QueueName
1811
+ extend ::ActiveSupport::Concern
1812
+ include GeneratedInstanceMethods
1813
+
1814
+ mixes_in_class_methods GeneratedClassMethods
1815
+ mixes_in_class_methods ::ActiveJob::QueueName::ClassMethods
1816
+
1817
+ # Returns the name of the queue the job will be run on.
1818
+ #
1819
+ # source://activejob//lib/active_job/queue_name.rb#61
1820
+ def queue_name; end
1821
+
1822
+ module GeneratedClassMethods
1823
+ def queue_name; end
1824
+ def queue_name=(value); end
1825
+ def queue_name?; end
1826
+ def queue_name_delimiter; end
1827
+ def queue_name_delimiter=(value); end
1828
+ def queue_name_delimiter?; end
1829
+ def queue_name_prefix; end
1830
+ def queue_name_prefix=(value); end
1831
+ def queue_name_prefix?; end
1832
+ end
1833
+
1834
+ module GeneratedInstanceMethods
1835
+ def queue_name_prefix; end
1836
+ def queue_name_prefix=(value); end
1837
+ def queue_name_prefix?; end
1838
+ end
1839
+ end
1840
+
1841
+ # Includes the ability to override the default queue name and prefix.
1842
+ #
1843
+ # source://activejob//lib/active_job/queue_name.rb#8
1844
+ module ActiveJob::QueueName::ClassMethods
1845
+ # source://activejob//lib/active_job/queue_name.rb#9
1846
+ def default_queue_name; end
1847
+
1848
+ # source://activejob//lib/active_job/queue_name.rb#9
1849
+ def default_queue_name=(val); end
1850
+
1851
+ # Specifies the name of the queue to process the job on.
1852
+ #
1853
+ # class PublishToFeedJob < ActiveJob::Base
1854
+ # queue_as :feeds
1855
+ #
1856
+ # def perform(post)
1857
+ # post.to_feed!
1858
+ # end
1859
+ # end
1860
+ #
1861
+ # Can be given a block that will evaluate in the context of the job
1862
+ # so that a dynamic queue name can be applied:
1863
+ #
1864
+ # class PublishToFeedJob < ApplicationJob
1865
+ # queue_as do
1866
+ # post = self.arguments.first
1867
+ #
1868
+ # if post.paid?
1869
+ # :paid_feeds
1870
+ # else
1871
+ # :feeds
1872
+ # end
1873
+ # end
1874
+ #
1875
+ # def perform(post)
1876
+ # post.to_feed!
1877
+ # end
1878
+ # end
1879
+ #
1880
+ # source://activejob//lib/active_job/queue_name.rb#39
1881
+ def queue_as(part_name = T.unsafe(nil), &block); end
1882
+
1883
+ # source://activejob//lib/active_job/queue_name.rb#47
1884
+ def queue_name_from_part(part_name); end
1885
+
1886
+ class << self
1887
+ # source://activejob//lib/active_job/queue_name.rb#9
1888
+ def default_queue_name; end
1889
+
1890
+ # source://activejob//lib/active_job/queue_name.rb#9
1891
+ def default_queue_name=(val); end
1892
+ end
1893
+ end
1894
+
1895
+ # source://activejob//lib/active_job/queue_priority.rb#4
1896
+ module ActiveJob::QueuePriority
1897
+ extend ::ActiveSupport::Concern
1898
+ include GeneratedInstanceMethods
1899
+
1900
+ mixes_in_class_methods GeneratedClassMethods
1901
+ mixes_in_class_methods ::ActiveJob::QueuePriority::ClassMethods
1902
+
1903
+ # Returns the priority that the job will be created with
1904
+ #
1905
+ # source://activejob//lib/active_job/queue_priority.rb#53
1906
+ def priority; end
1907
+
1908
+ module GeneratedClassMethods
1909
+ def priority; end
1910
+ def priority=(value); end
1911
+ def priority?; end
1912
+ end
1913
+
1914
+ module GeneratedInstanceMethods; end
1915
+ end
1916
+
1917
+ # Includes the ability to override the default queue priority.
1918
+ #
1919
+ # source://activejob//lib/active_job/queue_priority.rb#8
1920
+ module ActiveJob::QueuePriority::ClassMethods
1921
+ # source://activejob//lib/active_job/queue_priority.rb#9
1922
+ def default_priority; end
1923
+
1924
+ # source://activejob//lib/active_job/queue_priority.rb#9
1925
+ def default_priority=(val); end
1926
+
1927
+ # Specifies the priority of the queue to create the job with.
1928
+ #
1929
+ # class PublishToFeedJob < ActiveJob::Base
1930
+ # queue_with_priority 50
1931
+ #
1932
+ # def perform(post)
1933
+ # post.to_feed!
1934
+ # end
1935
+ # end
1936
+ #
1937
+ # Can be given a block that will evaluate in the context of the job
1938
+ # so that a dynamic priority can be applied:
1939
+ #
1940
+ # class PublishToFeedJob < ApplicationJob
1941
+ # queue_with_priority do
1942
+ # post = self.arguments.first
1943
+ #
1944
+ # if post.paid?
1945
+ # 10
1946
+ # else
1947
+ # 50
1948
+ # end
1949
+ # end
1950
+ #
1951
+ # def perform(post)
1952
+ # post.to_feed!
1953
+ # end
1954
+ # end
1955
+ #
1956
+ # source://activejob//lib/active_job/queue_priority.rb#39
1957
+ def queue_with_priority(priority = T.unsafe(nil), &block); end
1958
+
1959
+ class << self
1960
+ # source://activejob//lib/active_job/queue_priority.rb#9
1961
+ def default_priority; end
1962
+
1963
+ # source://activejob//lib/active_job/queue_priority.rb#9
1964
+ def default_priority=(val); end
1965
+ end
1966
+ end
1967
+
1968
+ # = Active Job Railtie
1969
+ #
1970
+ # source://activejob//lib/active_job/railtie.rb#8
1971
+ class ActiveJob::Railtie < ::Rails::Railtie; end
1972
+
1973
+ # Raised when an unsupported argument type is set as a job argument. We
1974
+ # currently support String, Integer, Float, NilClass, TrueClass, FalseClass,
1975
+ # BigDecimal, Symbol, Date, Time, DateTime, ActiveSupport::TimeWithZone,
1976
+ # ActiveSupport::Duration, Hash, ActiveSupport::HashWithIndifferentAccess,
1977
+ # Array, Range, or GlobalID::Identification instances, although this can be
1978
+ # extended by adding custom serializers.
1979
+ # Raised if you set the key for a Hash something else than a string or
1980
+ # a symbol. Also raised when trying to serialize an object which can't be
1981
+ # identified with a GlobalID - such as an unpersisted Active Record model.
1982
+ #
1983
+ # source://activejob//lib/active_job/arguments.rb#26
1984
+ class ActiveJob::SerializationError < ::ArgumentError; end
1985
+
1986
+ # = Active Job \Serializers
1987
+ #
1988
+ # The +ActiveJob::Serializers+ module is used to store a list of known serializers
1989
+ # and to add new ones. It also has helpers to serialize/deserialize objects.
1990
+ #
1991
+ # source://activejob//lib/active_job/serializers.rb#10
1992
+ module ActiveJob::Serializers
1993
+ extend ::ActiveSupport::Autoload
1994
+
1995
+ # source://activejob//lib/active_job/serializers.rb#25
1996
+ def _additional_serializers; end
1997
+
1998
+ # source://activejob//lib/active_job/serializers.rb#25
1999
+ def _additional_serializers=(val); end
2000
+
2001
+ class << self
2002
+ # source://activejob//lib/active_job/serializers.rb#25
2003
+ def _additional_serializers; end
2004
+
2005
+ # source://activejob//lib/active_job/serializers.rb#25
2006
+ def _additional_serializers=(val); end
2007
+
2008
+ # Adds new serializers to a list of known serializers.
2009
+ #
2010
+ # source://activejob//lib/active_job/serializers.rb#57
2011
+ def add_serializers(*new_serializers); end
2012
+
2013
+ # Returns deserialized object.
2014
+ # Will look up through all known serializers.
2015
+ # If no serializer found will raise <tt>ArgumentError</tt>.
2016
+ #
2017
+ # @raise [ArgumentError]
2018
+ #
2019
+ # source://activejob//lib/active_job/serializers.rb#41
2020
+ def deserialize(argument); end
2021
+
2022
+ # Returns serialized representative of the passed object.
2023
+ # Will look up through all known serializers.
2024
+ # Raises ActiveJob::SerializationError if it can't find a proper serializer.
2025
+ #
2026
+ # @raise [SerializationError]
2027
+ #
2028
+ # source://activejob//lib/active_job/serializers.rb#32
2029
+ def serialize(argument); end
2030
+
2031
+ # Returns list of known serializers.
2032
+ #
2033
+ # source://activejob//lib/active_job/serializers.rb#52
2034
+ def serializers; end
2035
+ end
2036
+ end
2037
+
2038
+ # source://activejob//lib/active_job/serializers/big_decimal_serializer.rb#7
2039
+ class ActiveJob::Serializers::BigDecimalSerializer < ::ActiveJob::Serializers::ObjectSerializer
2040
+ # source://activejob//lib/active_job/serializers/big_decimal_serializer.rb#12
2041
+ def deserialize(hash); end
2042
+
2043
+ # source://activejob//lib/active_job/serializers/big_decimal_serializer.rb#8
2044
+ def serialize(big_decimal); end
2045
+
2046
+ private
2047
+
2048
+ # source://activejob//lib/active_job/serializers/big_decimal_serializer.rb#17
2049
+ def klass; end
2050
+ end
2051
+
2052
+ # source://activejob//lib/active_job/serializers/date_serializer.rb#5
2053
+ class ActiveJob::Serializers::DateSerializer < ::ActiveJob::Serializers::ObjectSerializer
2054
+ # source://activejob//lib/active_job/serializers/date_serializer.rb#10
2055
+ def deserialize(hash); end
2056
+
2057
+ # source://activejob//lib/active_job/serializers/date_serializer.rb#6
2058
+ def serialize(date); end
2059
+
2060
+ private
2061
+
2062
+ # source://activejob//lib/active_job/serializers/date_serializer.rb#15
2063
+ def klass; end
2064
+ end
2065
+
2066
+ # source://activejob//lib/active_job/serializers/date_time_serializer.rb#5
2067
+ class ActiveJob::Serializers::DateTimeSerializer < ::ActiveJob::Serializers::TimeObjectSerializer
2068
+ # source://activejob//lib/active_job/serializers/date_time_serializer.rb#6
2069
+ def deserialize(hash); end
2070
+
2071
+ private
2072
+
2073
+ # source://activejob//lib/active_job/serializers/date_time_serializer.rb#11
2074
+ def klass; end
2075
+ end
2076
+
2077
+ # source://activejob//lib/active_job/serializers/duration_serializer.rb#5
2078
+ class ActiveJob::Serializers::DurationSerializer < ::ActiveJob::Serializers::ObjectSerializer
2079
+ # source://activejob//lib/active_job/serializers/duration_serializer.rb#12
2080
+ def deserialize(hash); end
2081
+
2082
+ # source://activejob//lib/active_job/serializers/duration_serializer.rb#6
2083
+ def serialize(duration); end
2084
+
2085
+ private
2086
+
2087
+ # source://activejob//lib/active_job/serializers/duration_serializer.rb#20
2088
+ def klass; end
2089
+ end
2090
+
2091
+ # source://activejob//lib/active_job/serializers/module_serializer.rb#5
2092
+ class ActiveJob::Serializers::ModuleSerializer < ::ActiveJob::Serializers::ObjectSerializer
2093
+ # source://activejob//lib/active_job/serializers/module_serializer.rb#11
2094
+ def deserialize(hash); end
2095
+
2096
+ # @raise [SerializationError]
2097
+ #
2098
+ # source://activejob//lib/active_job/serializers/module_serializer.rb#6
2099
+ def serialize(constant); end
2100
+
2101
+ private
2102
+
2103
+ # source://activejob//lib/active_job/serializers/module_serializer.rb#16
2104
+ def klass; end
2105
+ end
2106
+
2107
+ # Base class for serializing and deserializing custom objects.
2108
+ #
2109
+ # Example:
2110
+ #
2111
+ # class MoneySerializer < ActiveJob::Serializers::ObjectSerializer
2112
+ # def serialize(money)
2113
+ # super("amount" => money.amount, "currency" => money.currency)
2114
+ # end
2115
+ #
2116
+ # def deserialize(hash)
2117
+ # Money.new(hash["amount"], hash["currency"])
2118
+ # end
2119
+ #
2120
+ # private
2121
+ #
2122
+ # def klass
2123
+ # Money
2124
+ # end
2125
+ # end
2126
+ #
2127
+ # source://activejob//lib/active_job/serializers/object_serializer.rb#26
2128
+ class ActiveJob::Serializers::ObjectSerializer
2129
+ include ::Singleton
2130
+ extend ::Singleton::SingletonClassMethods
2131
+
2132
+ # Deserializes an argument from a JSON primitive type.
2133
+ #
2134
+ # @raise [NotImplementedError]
2135
+ #
2136
+ # source://activejob//lib/active_job/serializers/object_serializer.rb#44
2137
+ def deserialize(json); end
2138
+
2139
+ # Serializes an argument to a JSON primitive type.
2140
+ #
2141
+ # source://activejob//lib/active_job/serializers/object_serializer.rb#39
2142
+ def serialize(hash); end
2143
+
2144
+ # Determines if an argument should be serialized by a serializer.
2145
+ #
2146
+ # @return [Boolean]
2147
+ #
2148
+ # source://activejob//lib/active_job/serializers/object_serializer.rb#34
2149
+ def serialize?(argument); end
2150
+
2151
+ private
2152
+
2153
+ # The class of the object that will be serialized.
2154
+ #
2155
+ # @raise [NotImplementedError]
2156
+ #
2157
+ # source://activejob//lib/active_job/serializers/object_serializer.rb#50
2158
+ def klass; end
2159
+
2160
+ class << self
2161
+ # source://activejob//lib/active_job/serializers/object_serializer.rb#30
2162
+ def deserialize(*_arg0, **_arg1, &_arg2); end
2163
+
2164
+ # source://activejob//lib/active_job/serializers/object_serializer.rb#30
2165
+ def serialize(*_arg0, **_arg1, &_arg2); end
2166
+
2167
+ # source://activejob//lib/active_job/serializers/object_serializer.rb#30
2168
+ def serialize?(*_arg0, **_arg1, &_arg2); end
2169
+
2170
+ private
2171
+
2172
+ def allocate; end
2173
+ def new(*_arg0); end
2174
+ end
2175
+ end
2176
+
2177
+ # source://activejob//lib/active_job/serializers/range_serializer.rb#5
2178
+ class ActiveJob::Serializers::RangeSerializer < ::ActiveJob::Serializers::ObjectSerializer
2179
+ # source://activejob//lib/active_job/serializers/range_serializer.rb#13
2180
+ def deserialize(hash); end
2181
+
2182
+ # source://activejob//lib/active_job/serializers/range_serializer.rb#8
2183
+ def serialize(range); end
2184
+
2185
+ private
2186
+
2187
+ # source://activejob//lib/active_job/serializers/range_serializer.rb#18
2188
+ def klass; end
2189
+ end
2190
+
2191
+ # source://activejob//lib/active_job/serializers/range_serializer.rb#6
2192
+ ActiveJob::Serializers::RangeSerializer::KEYS = T.let(T.unsafe(nil), Array)
2193
+
2194
+ # source://activejob//lib/active_job/serializers/symbol_serializer.rb#5
2195
+ class ActiveJob::Serializers::SymbolSerializer < ::ActiveJob::Serializers::ObjectSerializer
2196
+ # source://activejob//lib/active_job/serializers/symbol_serializer.rb#10
2197
+ def deserialize(argument); end
2198
+
2199
+ # source://activejob//lib/active_job/serializers/symbol_serializer.rb#6
2200
+ def serialize(argument); end
2201
+
2202
+ private
2203
+
2204
+ # source://activejob//lib/active_job/serializers/symbol_serializer.rb#15
2205
+ def klass; end
2206
+ end
2207
+
2208
+ # source://activejob//lib/active_job/serializers/time_object_serializer.rb#5
2209
+ class ActiveJob::Serializers::TimeObjectSerializer < ::ActiveJob::Serializers::ObjectSerializer
2210
+ # source://activejob//lib/active_job/serializers/time_object_serializer.rb#8
2211
+ def serialize(time); end
2212
+ end
2213
+
2214
+ # source://activejob//lib/active_job/serializers/time_object_serializer.rb#6
2215
+ ActiveJob::Serializers::TimeObjectSerializer::NANO_PRECISION = T.let(T.unsafe(nil), Integer)
2216
+
2217
+ # source://activejob//lib/active_job/serializers/time_serializer.rb#5
2218
+ class ActiveJob::Serializers::TimeSerializer < ::ActiveJob::Serializers::TimeObjectSerializer
2219
+ # source://activejob//lib/active_job/serializers/time_serializer.rb#6
2220
+ def deserialize(hash); end
2221
+
2222
+ private
2223
+
2224
+ # source://activejob//lib/active_job/serializers/time_serializer.rb#11
2225
+ def klass; end
2226
+ end
2227
+
2228
+ # source://activejob//lib/active_job/serializers/time_with_zone_serializer.rb#5
2229
+ class ActiveJob::Serializers::TimeWithZoneSerializer < ::ActiveJob::Serializers::ObjectSerializer
2230
+ # source://activejob//lib/active_job/serializers/time_with_zone_serializer.rb#15
2231
+ def deserialize(hash); end
2232
+
2233
+ # source://activejob//lib/active_job/serializers/time_with_zone_serializer.rb#8
2234
+ def serialize(time_with_zone); end
2235
+
2236
+ private
2237
+
2238
+ # source://activejob//lib/active_job/serializers/time_with_zone_serializer.rb#20
2239
+ def klass; end
2240
+ end
2241
+
2242
+ # source://activejob//lib/active_job/serializers/time_with_zone_serializer.rb#6
2243
+ ActiveJob::Serializers::TimeWithZoneSerializer::NANO_PRECISION = T.let(T.unsafe(nil), Integer)
2244
+
2245
+ # source://activejob//lib/active_job/test_case.rb#6
2246
+ class ActiveJob::TestCase < ::ActiveSupport::TestCase
2247
+ include ::ActiveJob::TestHelper
2248
+ end
2249
+
2250
+ # Provides helper methods for testing Active Job
2251
+ #
2252
+ # source://activejob//lib/active_job/test_helper.rb#8
2253
+ module ActiveJob::TestHelper
2254
+ include ::ActiveSupport::Testing::Assertions
2255
+
2256
+ # source://activejob//lib/active_job/test_helper.rb#56
2257
+ def after_teardown; end
2258
+
2259
+ # Asserts that the number of enqueued jobs matches the given number.
2260
+ #
2261
+ # def test_jobs
2262
+ # assert_enqueued_jobs 0
2263
+ # HelloJob.perform_later('david')
2264
+ # assert_enqueued_jobs 1
2265
+ # HelloJob.perform_later('abdelkader')
2266
+ # assert_enqueued_jobs 2
2267
+ # end
2268
+ #
2269
+ # If a block is passed, asserts that the block will cause the specified number of
2270
+ # jobs to be enqueued.
2271
+ #
2272
+ # def test_jobs_again
2273
+ # assert_enqueued_jobs 1 do
2274
+ # HelloJob.perform_later('cristian')
2275
+ # end
2276
+ #
2277
+ # assert_enqueued_jobs 2 do
2278
+ # HelloJob.perform_later('aaron')
2279
+ # HelloJob.perform_later('rafael')
2280
+ # end
2281
+ # end
2282
+ #
2283
+ # Asserts the number of times a specific job was enqueued by passing +:only+ option.
2284
+ #
2285
+ # def test_logging_job
2286
+ # assert_enqueued_jobs 1, only: LoggingJob do
2287
+ # LoggingJob.perform_later
2288
+ # HelloJob.perform_later('jeremy')
2289
+ # end
2290
+ # end
2291
+ #
2292
+ # Asserts the number of times a job except specific class was enqueued by passing +:except+ option.
2293
+ #
2294
+ # def test_logging_job
2295
+ # assert_enqueued_jobs 1, except: HelloJob do
2296
+ # LoggingJob.perform_later
2297
+ # HelloJob.perform_later('jeremy')
2298
+ # end
2299
+ # end
2300
+ #
2301
+ # +:only+ and +:except+ options accept Class, Array of Class, or Proc. When passed a Proc,
2302
+ # a hash containing the job's class and it's argument are passed as argument.
2303
+ #
2304
+ # Asserts the number of times a job is enqueued to a specific queue by passing +:queue+ option.
2305
+ #
2306
+ # def test_logging_job
2307
+ # assert_enqueued_jobs 2, queue: 'default' do
2308
+ # LoggingJob.perform_later
2309
+ # HelloJob.perform_later('elfassy')
2310
+ # end
2311
+ # end
2312
+ #
2313
+ # source://activejob//lib/active_job/test_helper.rb#122
2314
+ def assert_enqueued_jobs(number, only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), &block); end
2315
+
2316
+ # Asserts that the job has been enqueued with the given arguments.
2317
+ #
2318
+ # def test_assert_enqueued_with
2319
+ # MyJob.perform_later(1,2,3)
2320
+ # assert_enqueued_with(job: MyJob, args: [1,2,3])
2321
+ #
2322
+ # MyJob.set(wait_until: Date.tomorrow.noon, queue: "my_queue").perform_later
2323
+ # assert_enqueued_with(at: Date.tomorrow.noon, queue: "my_queue")
2324
+ # end
2325
+ #
2326
+ # For keyword arguments, specify them as a hash inside an array:
2327
+ #
2328
+ # def test_assert_enqueued_with_keyword_arguments
2329
+ # MyJob.perform_later(arg1: 'value1', arg2: 'value2')
2330
+ # assert_enqueued_with(job: MyJob, args: [{ arg1: 'value1', arg2: 'value2' }])
2331
+ # end
2332
+ #
2333
+ # The given arguments may also be specified as matcher procs that return a
2334
+ # boolean value indicating whether a job's attribute meets certain criteria.
2335
+ #
2336
+ # For example, a proc can be used to match a range of times:
2337
+ #
2338
+ # def test_assert_enqueued_with
2339
+ # at_matcher = ->(job_at) { (Date.yesterday..Date.tomorrow).cover?(job_at) }
2340
+ #
2341
+ # MyJob.set(wait_until: Date.today.noon).perform_later
2342
+ #
2343
+ # assert_enqueued_with(job: MyJob, at: at_matcher)
2344
+ # end
2345
+ #
2346
+ # A proc can also be used to match a subset of a job's args:
2347
+ #
2348
+ # def test_assert_enqueued_with
2349
+ # args_matcher = ->(job_args) { job_args[0].key?(:foo) }
2350
+ #
2351
+ # MyJob.perform_later(foo: "bar", other_arg: "No need to check in the test")
2352
+ #
2353
+ # assert_enqueued_with(job: MyJob, args: args_matcher)
2354
+ # end
2355
+ #
2356
+ # If a block is passed, asserts that the block will cause the job to be
2357
+ # enqueued with the given arguments.
2358
+ #
2359
+ # def test_assert_enqueued_with
2360
+ # assert_enqueued_with(job: MyJob, args: [1,2,3]) do
2361
+ # MyJob.perform_later(1,2,3)
2362
+ # end
2363
+ #
2364
+ # assert_enqueued_with(job: MyJob, at: Date.tomorrow.noon) do
2365
+ # MyJob.set(wait_until: Date.tomorrow.noon).perform_later
2366
+ # end
2367
+ # end
2368
+ #
2369
+ # source://activejob//lib/active_job/test_helper.rb#406
2370
+ def assert_enqueued_with(job: T.unsafe(nil), args: T.unsafe(nil), at: T.unsafe(nil), queue: T.unsafe(nil), priority: T.unsafe(nil), &block); end
2371
+
2372
+ # Asserts that no jobs have been enqueued.
2373
+ #
2374
+ # def test_jobs
2375
+ # assert_no_enqueued_jobs
2376
+ # HelloJob.perform_later('jeremy')
2377
+ # assert_enqueued_jobs 1
2378
+ # end
2379
+ #
2380
+ # If a block is passed, asserts that the block will not cause any job to be enqueued.
2381
+ #
2382
+ # def test_jobs_again
2383
+ # assert_no_enqueued_jobs do
2384
+ # # No job should be enqueued from this block
2385
+ # end
2386
+ # end
2387
+ #
2388
+ # Asserts that no jobs of a specific kind are enqueued by passing +:only+ option.
2389
+ #
2390
+ # def test_no_logging
2391
+ # assert_no_enqueued_jobs only: LoggingJob do
2392
+ # HelloJob.perform_later('jeremy')
2393
+ # end
2394
+ # end
2395
+ #
2396
+ # Asserts that no jobs except specific class are enqueued by passing +:except+ option.
2397
+ #
2398
+ # def test_no_logging
2399
+ # assert_no_enqueued_jobs except: HelloJob do
2400
+ # HelloJob.perform_later('jeremy')
2401
+ # end
2402
+ # end
2403
+ #
2404
+ # +:only+ and +:except+ options accept Class, Array of Class, or Proc. When passed a Proc,
2405
+ # a hash containing the job's class and it's argument are passed as argument.
2406
+ #
2407
+ # Asserts that no jobs are enqueued to a specific queue by passing +:queue+ option
2408
+ #
2409
+ # def test_no_logging
2410
+ # assert_no_enqueued_jobs queue: 'default' do
2411
+ # LoggingJob.set(queue: :some_queue).perform_later
2412
+ # end
2413
+ # end
2414
+ #
2415
+ # Note: This assertion is simply a shortcut for:
2416
+ #
2417
+ # assert_enqueued_jobs 0, &block
2418
+ #
2419
+ # source://activejob//lib/active_job/test_helper.rb#186
2420
+ def assert_no_enqueued_jobs(only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), &block); end
2421
+
2422
+ # Asserts that no jobs have been performed.
2423
+ #
2424
+ # def test_jobs
2425
+ # assert_no_performed_jobs
2426
+ #
2427
+ # perform_enqueued_jobs do
2428
+ # HelloJob.perform_later('matthew')
2429
+ # assert_performed_jobs 1
2430
+ # end
2431
+ # end
2432
+ #
2433
+ # If a block is passed, asserts that the block will not cause any job to be performed.
2434
+ #
2435
+ # def test_jobs_again
2436
+ # assert_no_performed_jobs do
2437
+ # # No job should be performed from this block
2438
+ # end
2439
+ # end
2440
+ #
2441
+ # The block form supports filtering. If the +:only+ option is specified,
2442
+ # then only the listed job(s) will not be performed.
2443
+ #
2444
+ # def test_no_logging
2445
+ # assert_no_performed_jobs only: LoggingJob do
2446
+ # HelloJob.perform_later('jeremy')
2447
+ # end
2448
+ # end
2449
+ #
2450
+ # Also if the +:except+ option is specified,
2451
+ # then the job(s) except specific class will not be performed.
2452
+ #
2453
+ # def test_no_logging
2454
+ # assert_no_performed_jobs except: HelloJob do
2455
+ # HelloJob.perform_later('jeremy')
2456
+ # end
2457
+ # end
2458
+ #
2459
+ # +:only+ and +:except+ options accept Class, Array of Class, or Proc. When passed a Proc,
2460
+ # an instance of the job will be passed as argument.
2461
+ #
2462
+ # If the +:queue+ option is specified,
2463
+ # then only the job(s) enqueued to a specific queue will not be performed.
2464
+ #
2465
+ # def test_assert_no_performed_jobs_with_queue_option
2466
+ # assert_no_performed_jobs queue: :some_queue do
2467
+ # HelloJob.set(queue: :other_queue).perform_later("jeremy")
2468
+ # end
2469
+ # end
2470
+ #
2471
+ # Note: This assertion is simply a shortcut for:
2472
+ #
2473
+ # assert_performed_jobs 0, &block
2474
+ #
2475
+ # source://activejob//lib/active_job/test_helper.rb#348
2476
+ def assert_no_performed_jobs(only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), &block); end
2477
+
2478
+ # Asserts that the number of performed jobs matches the given number.
2479
+ # If no block is passed, <tt>perform_enqueued_jobs</tt>
2480
+ # must be called around or after the job call.
2481
+ #
2482
+ # def test_jobs
2483
+ # assert_performed_jobs 0
2484
+ #
2485
+ # perform_enqueued_jobs do
2486
+ # HelloJob.perform_later('xavier')
2487
+ # end
2488
+ # assert_performed_jobs 1
2489
+ #
2490
+ # HelloJob.perform_later('yves')
2491
+ #
2492
+ # perform_enqueued_jobs
2493
+ #
2494
+ # assert_performed_jobs 2
2495
+ # end
2496
+ #
2497
+ # If a block is passed, asserts that the block will cause the specified number of
2498
+ # jobs to be performed.
2499
+ #
2500
+ # def test_jobs_again
2501
+ # assert_performed_jobs 1 do
2502
+ # HelloJob.perform_later('robin')
2503
+ # end
2504
+ #
2505
+ # assert_performed_jobs 2 do
2506
+ # HelloJob.perform_later('carlos')
2507
+ # HelloJob.perform_later('sean')
2508
+ # end
2509
+ # end
2510
+ #
2511
+ # This method also supports filtering. If the +:only+ option is specified,
2512
+ # then only the listed job(s) will be performed.
2513
+ #
2514
+ # def test_hello_job
2515
+ # assert_performed_jobs 1, only: HelloJob do
2516
+ # HelloJob.perform_later('jeremy')
2517
+ # LoggingJob.perform_later
2518
+ # end
2519
+ # end
2520
+ #
2521
+ # Also if the +:except+ option is specified,
2522
+ # then the job(s) except specific class will be performed.
2523
+ #
2524
+ # def test_hello_job
2525
+ # assert_performed_jobs 1, except: LoggingJob do
2526
+ # HelloJob.perform_later('jeremy')
2527
+ # LoggingJob.perform_later
2528
+ # end
2529
+ # end
2530
+ #
2531
+ # An array may also be specified, to support testing multiple jobs.
2532
+ #
2533
+ # def test_hello_and_logging_jobs
2534
+ # assert_nothing_raised do
2535
+ # assert_performed_jobs 2, only: [HelloJob, LoggingJob] do
2536
+ # HelloJob.perform_later('jeremy')
2537
+ # LoggingJob.perform_later('stewie')
2538
+ # RescueJob.perform_later('david')
2539
+ # end
2540
+ # end
2541
+ # end
2542
+ #
2543
+ # A proc may also be specified. When passed a Proc, the job's instance will be passed as argument.
2544
+ #
2545
+ # def test_hello_and_logging_jobs
2546
+ # assert_nothing_raised do
2547
+ # assert_performed_jobs(1, only: ->(job) { job.is_a?(HelloJob) }) do
2548
+ # HelloJob.perform_later('jeremy')
2549
+ # LoggingJob.perform_later('stewie')
2550
+ # RescueJob.perform_later('david')
2551
+ # end
2552
+ # end
2553
+ # end
2554
+ #
2555
+ # If the +:queue+ option is specified,
2556
+ # then only the job(s) enqueued to a specific queue will be performed.
2557
+ #
2558
+ # def test_assert_performed_jobs_with_queue_option
2559
+ # assert_performed_jobs 1, queue: :some_queue do
2560
+ # HelloJob.set(queue: :some_queue).perform_later("jeremy")
2561
+ # HelloJob.set(queue: :other_queue).perform_later("bogdan")
2562
+ # end
2563
+ # end
2564
+ #
2565
+ # source://activejob//lib/active_job/test_helper.rb#278
2566
+ def assert_performed_jobs(number, only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), &block); end
2567
+
2568
+ # Asserts that the job has been performed with the given arguments.
2569
+ #
2570
+ # def test_assert_performed_with
2571
+ # MyJob.perform_later(1,2,3)
2572
+ #
2573
+ # perform_enqueued_jobs
2574
+ #
2575
+ # assert_performed_with(job: MyJob, args: [1,2,3])
2576
+ #
2577
+ # MyJob.set(wait_until: Date.tomorrow.noon, queue: "my_queue").perform_later
2578
+ #
2579
+ # perform_enqueued_jobs
2580
+ #
2581
+ # assert_performed_with(at: Date.tomorrow.noon, queue: "my_queue")
2582
+ # end
2583
+ #
2584
+ # The given arguments may also be specified as matcher procs that return a
2585
+ # boolean value indicating whether a job's attribute meets certain criteria.
2586
+ #
2587
+ # For example, a proc can be used to match a range of times:
2588
+ #
2589
+ # def test_assert_performed_with
2590
+ # at_matcher = ->(job_at) { (Date.yesterday..Date.tomorrow).cover?(job_at) }
2591
+ #
2592
+ # MyJob.set(wait_until: Date.today.noon).perform_later
2593
+ #
2594
+ # perform_enqueued_jobs
2595
+ #
2596
+ # assert_performed_with(job: MyJob, at: at_matcher)
2597
+ # end
2598
+ #
2599
+ # A proc can also be used to match a subset of a job's args:
2600
+ #
2601
+ # def test_assert_performed_with
2602
+ # args_matcher = ->(job_args) { job_args[0].key?(:foo) }
2603
+ #
2604
+ # MyJob.perform_later(foo: "bar", other_arg: "No need to check in the test")
2605
+ #
2606
+ # perform_enqueued_jobs
2607
+ #
2608
+ # assert_performed_with(job: MyJob, args: args_matcher)
2609
+ # end
2610
+ #
2611
+ # If a block is passed, that block performs all of the jobs that were
2612
+ # enqueued throughout the duration of the block and asserts that
2613
+ # the job has been performed with the given arguments in the block.
2614
+ #
2615
+ # def test_assert_performed_with
2616
+ # assert_performed_with(job: MyJob, args: [1,2,3]) do
2617
+ # MyJob.perform_later(1,2,3)
2618
+ # end
2619
+ #
2620
+ # assert_performed_with(job: MyJob, at: Date.tomorrow.noon) do
2621
+ # MyJob.set(wait_until: Date.tomorrow.noon).perform_later
2622
+ # end
2623
+ # end
2624
+ #
2625
+ # source://activejob//lib/active_job/test_helper.rb#510
2626
+ def assert_performed_with(job: T.unsafe(nil), args: T.unsafe(nil), at: T.unsafe(nil), queue: T.unsafe(nil), priority: T.unsafe(nil), &block); end
2627
+
2628
+ # source://activejob//lib/active_job/test_helper.rb#41
2629
+ def before_setup; end
2630
+
2631
+ # source://activejob//lib/active_job/test_helper.rb#9
2632
+ def enqueued_jobs(*_arg0, **_arg1, &_arg2); end
2633
+
2634
+ # source://activejob//lib/active_job/test_helper.rb#9
2635
+ def enqueued_jobs=(arg); end
2636
+
2637
+ # Performs all enqueued jobs. If a block is given, performs all of the jobs
2638
+ # that were enqueued throughout the duration of the block. If a block is
2639
+ # not given, performs all of the enqueued jobs up to this point in the test.
2640
+ #
2641
+ # def test_perform_enqueued_jobs
2642
+ # perform_enqueued_jobs do
2643
+ # MyJob.perform_later(1, 2, 3)
2644
+ # end
2645
+ # assert_performed_jobs 1
2646
+ # end
2647
+ #
2648
+ # def test_perform_enqueued_jobs_without_block
2649
+ # MyJob.perform_later(1, 2, 3)
2650
+ #
2651
+ # perform_enqueued_jobs
2652
+ #
2653
+ # assert_performed_jobs 1
2654
+ # end
2655
+ #
2656
+ # This method also supports filtering. If the +:only+ option is specified,
2657
+ # then only the listed job(s) will be performed.
2658
+ #
2659
+ # def test_perform_enqueued_jobs_with_only
2660
+ # perform_enqueued_jobs(only: MyJob) do
2661
+ # MyJob.perform_later(1, 2, 3) # will be performed
2662
+ # HelloJob.perform_later(1, 2, 3) # will not be performed
2663
+ # end
2664
+ # assert_performed_jobs 1
2665
+ # end
2666
+ #
2667
+ # Also if the +:except+ option is specified,
2668
+ # then the job(s) except specific class will be performed.
2669
+ #
2670
+ # def test_perform_enqueued_jobs_with_except
2671
+ # perform_enqueued_jobs(except: HelloJob) do
2672
+ # MyJob.perform_later(1, 2, 3) # will be performed
2673
+ # HelloJob.perform_later(1, 2, 3) # will not be performed
2674
+ # end
2675
+ # assert_performed_jobs 1
2676
+ # end
2677
+ #
2678
+ # +:only+ and +:except+ options accept Class, Array of Class, or Proc. When passed a Proc,
2679
+ # an instance of the job will be passed as argument.
2680
+ #
2681
+ # If the +:queue+ option is specified,
2682
+ # then only the job(s) enqueued to a specific queue will be performed.
2683
+ #
2684
+ # def test_perform_enqueued_jobs_with_queue
2685
+ # perform_enqueued_jobs queue: :some_queue do
2686
+ # MyJob.set(queue: :some_queue).perform_later(1, 2, 3) # will be performed
2687
+ # HelloJob.set(queue: :other_queue).perform_later(1, 2, 3) # will not be performed
2688
+ # end
2689
+ # assert_performed_jobs 1
2690
+ # end
2691
+ #
2692
+ # If the +:at+ option is specified, then only jobs that have been enqueued
2693
+ # to run at or before the given time will be performed. This includes jobs
2694
+ # that have been enqueued without a time.
2695
+ #
2696
+ # If queue_adapter_for_test is overridden to return a different adapter,
2697
+ # +perform_enqueued_jobs+ will merely execute the block.
2698
+ #
2699
+ # source://activejob//lib/active_job/test_helper.rb#620
2700
+ def perform_enqueued_jobs(only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), at: T.unsafe(nil), &block); end
2701
+
2702
+ # source://activejob//lib/active_job/test_helper.rb#9
2703
+ def performed_jobs(*_arg0, **_arg1, &_arg2); end
2704
+
2705
+ # source://activejob//lib/active_job/test_helper.rb#9
2706
+ def performed_jobs=(arg); end
2707
+
2708
+ # Accesses the queue_adapter set by ActiveJob::Base.
2709
+ #
2710
+ # def test_assert_job_has_custom_queue_adapter_set
2711
+ # assert_instance_of CustomQueueAdapter, HelloJob.queue_adapter
2712
+ # end
2713
+ #
2714
+ # source://activejob//lib/active_job/test_helper.rb#661
2715
+ def queue_adapter; end
2716
+
2717
+ # Returns a queue adapter instance to use with all Active Job test helpers.
2718
+ # By default, returns an instance of ActiveJob::QueueAdapters::TestAdapter.
2719
+ # Override this method to specify a different adapter. The adapter must
2720
+ # implement the same interface as ActiveJob::QueueAdapters::TestAdapter.
2721
+ #
2722
+ # source://activejob//lib/active_job/test_helper.rb#66
2723
+ def queue_adapter_for_test; end
2724
+
2725
+ private
2726
+
2727
+ # source://activejob//lib/active_job/test_helper.rb#676
2728
+ def clear_enqueued_jobs; end
2729
+
2730
+ # source://activejob//lib/active_job/test_helper.rb#680
2731
+ def clear_performed_jobs; end
2732
+
2733
+ # source://activejob//lib/active_job/test_helper.rb#745
2734
+ def deserialize_args_for_assertion(job); end
2735
+
2736
+ # source://activejob//lib/active_job/test_helper.rb#716
2737
+ def enqueued_jobs_with(only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), at: T.unsafe(nil), &block); end
2738
+
2739
+ # source://activejob//lib/active_job/test_helper.rb#710
2740
+ def filter_as_proc(filter); end
2741
+
2742
+ # source://activejob//lib/active_job/test_helper.rb#724
2743
+ def flush_enqueued_jobs(only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), at: T.unsafe(nil)); end
2744
+
2745
+ # source://activejob//lib/active_job/test_helper.rb#752
2746
+ def instantiate_job(payload, skip_deserialize_arguments: T.unsafe(nil)); end
2747
+
2748
+ # source://activejob//lib/active_job/test_helper.rb#684
2749
+ def jobs_with(jobs, only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), at: T.unsafe(nil)); end
2750
+
2751
+ # source://activejob//lib/active_job/test_helper.rb#720
2752
+ def performed_jobs_with(only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), &block); end
2753
+
2754
+ # source://activejob//lib/active_job/test_helper.rb#732
2755
+ def prepare_args_for_assertion(args); end
2756
+
2757
+ # source://activejob//lib/active_job/test_helper.rb#759
2758
+ def queue_adapter_changed_jobs; end
2759
+
2760
+ # source://activejob//lib/active_job/test_helper.rb#666
2761
+ def require_active_job_test_adapter!(method); end
2762
+
2763
+ # @return [Boolean]
2764
+ #
2765
+ # source://activejob//lib/active_job/test_helper.rb#672
2766
+ def using_test_adapter?; end
2767
+
2768
+ # @raise [ArgumentError]
2769
+ #
2770
+ # source://activejob//lib/active_job/test_helper.rb#766
2771
+ def validate_option(only: T.unsafe(nil), except: T.unsafe(nil)); end
2772
+ end
2773
+
2774
+ # source://activejob//lib/active_job/test_helper.rb#15
2775
+ module ActiveJob::TestHelper::TestQueueAdapter
2776
+ extend ::ActiveSupport::Concern
2777
+ include GeneratedInstanceMethods
2778
+
2779
+ mixes_in_class_methods GeneratedClassMethods
2780
+ mixes_in_class_methods ::ActiveJob::TestHelper::TestQueueAdapter::ClassMethods
2781
+
2782
+ module GeneratedClassMethods
2783
+ def _test_adapter; end
2784
+ def _test_adapter=(value); end
2785
+ end
2786
+
2787
+ module GeneratedInstanceMethods; end
2788
+ end
2789
+
2790
+ # source://activejob//lib/active_job/test_helper.rb#22
2791
+ module ActiveJob::TestHelper::TestQueueAdapter::ClassMethods
2792
+ # source://activejob//lib/active_job/test_helper.rb#27
2793
+ def disable_test_adapter; end
2794
+
2795
+ # source://activejob//lib/active_job/test_helper.rb#31
2796
+ def enable_test_adapter(test_adapter); end
2797
+
2798
+ # source://activejob//lib/active_job/test_helper.rb#23
2799
+ def queue_adapter; end
2800
+ end
2801
+
2802
+ # source://activejob//lib/active_job/timezones.rb#4
2803
+ module ActiveJob::Timezones
2804
+ extend ::ActiveSupport::Concern
2805
+ end
2806
+
2807
+ # source://activejob//lib/active_job/translation.rb#4
2808
+ module ActiveJob::Translation
2809
+ extend ::ActiveSupport::Concern
2810
+ end
2811
+
2812
+ # source://activejob//lib/active_job/gem_version.rb#9
2813
+ module ActiveJob::VERSION; end
2814
+
2815
+ # source://activejob//lib/active_job/gem_version.rb#10
2816
+ ActiveJob::VERSION::MAJOR = T.let(T.unsafe(nil), Integer)
2817
+
2818
+ # source://activejob//lib/active_job/gem_version.rb#11
2819
+ ActiveJob::VERSION::MINOR = T.let(T.unsafe(nil), Integer)
2820
+
2821
+ # source://activejob//lib/active_job/gem_version.rb#13
2822
+ ActiveJob::VERSION::PRE = T.let(T.unsafe(nil), T.untyped)
2823
+
2824
+ # source://activejob//lib/active_job/gem_version.rb#15
2825
+ ActiveJob::VERSION::STRING = T.let(T.unsafe(nil), String)
2826
+
2827
+ # source://activejob//lib/active_job/gem_version.rb#12
2828
+ ActiveJob::VERSION::TINY = T.let(T.unsafe(nil), Integer)