Last active
May 17, 2021 15:52
-
-
Save agrare/1bda71f35dc013dd87db985c3a8cf036 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
schedule_settings_for_ems_refresh = ExtManagementSystem.supported_subclasses.each.with_object({}) do |klass, hash| | |
next unless klass.ems_type | |
every = ::Settings.ems_refresh[klass.ems_type].try(:refresh_interval) || ::Settings.ems_refresh.refresh_interval | |
every = every.respond_to?(:to_i_with_method) ? every.to_i_with_method : every.to_i | |
hash[klass] = every unless every == 0 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment