packwerk 2.2.0 → 2.2.1

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