lib/resque/scheduler/scheduling_extensions.rb in resque-scheduler-4.4.0 vs lib/resque/scheduler/scheduling_extensions.rb in resque-scheduler-4.5.0

- old
+ new

@@ -34,11 +34,11 @@ # (hash key) will be used as :class. # # :args can be any yaml which will be converted to a ruby literal and # passed in a params. (optional) # - # :rails_envs is the list of envs where the job gets loaded. Envs are + # :rails_env is the list of envs where the job gets loaded. Envs are # comma separated (optional) # # :description is just that, a description of the job (optional). If # params is an array, each element in the array is passed as a separate # param, otherwise params is passed in as the only parameter to @@ -99,15 +99,16 @@ def fetch_schedule(name) schedule[name] end # remove a given schedule by name - def remove_schedule(name) + # Preventing a reload is optional and available to batch operations + def remove_schedule(name, reload = true) non_persistent_schedules.delete(name) redis.hdel(:persistent_schedules, name) redis.sadd(:schedules_changed, name) - reload_schedule! + reload_schedule! if reload end private # we store our non-persistent schedules in this hash