File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ def dispatchers_options
141141
142142 def recurring_tasks
143143 @recurring_tasks ||= recurring_tasks_config . map do |id , options |
144- RecurringTask . from_configuration ( id , **options ) if options . has_key? ( :schedule )
144+ RecurringTask . from_configuration ( id , **options ) if options & .has_key? ( :schedule )
145145 end . compact
146146 end
147147
@@ -153,7 +153,9 @@ def processes_config
153153 end
154154
155155 def recurring_tasks_config
156- @recurring_tasks_config ||= config_from options [ :recurring_schedule_file ]
156+ @recurring_tasks_config ||= begin
157+ config_from options [ :recurring_schedule_file ]
158+ end
157159 end
158160
159161
Original file line number Diff line number Diff line change @@ -103,6 +103,10 @@ class ConfigurationTest < ActiveSupport::TestCase
103103 assert configuration . valid?
104104 assert_processes configuration , :scheduler , 0
105105
106+ configuration = SolidQueue ::Configuration . new ( recurring_schedule_file : config_file_path ( :recurring_with_empty ) )
107+ assert configuration . valid?
108+ assert_processes configuration , :scheduler , 0
109+
106110 # No processes
107111 configuration = SolidQueue ::Configuration . new ( skip_recurring : true , dispatchers : [ ] , workers : [ ] )
108112 assert_not configuration . valid?
You can’t perform that action at this time.
0 commit comments