Giter Club home page Giter Club logo

Comments (2)

matt-domsch-sp avatar matt-domsch-sp commented on July 24, 2024 1

We do have a separate sidekiq_schedule.yml file, so that alone won't solve it. We will patch out the config tests for now.

from sidekiq-scheduler.

marcelolx avatar marcelolx commented on July 24, 2024

I think you can workaround this by using a separate file for sidekiq scheduler as mentioned here https://github.com/sidekiq-scheduler/sidekiq-scheduler?tab=readme-ov-file#load-the-schedule-from-a-different-file

We have added this check because before sidekiq-scheduler dynamic config would be at the root level of the file and we have moved everything under scheduler and wanted to explicitly error out if you would not have moved it to the right place.

We didn't know about sidekiq-limit_fetch usage of the dynamic keyword.

As the next major release we can remove those checks, in the meantime, you can patch the adapter so it doesn't raises an error, probably something like the following in your project (assuming it is a Rails project)

Ref to the code in sidekiq-scheduler

# config/initializers/sidekiq-scheduler/sidekiq_adapter.rb
module SidekiqScheduler
  class SidekiqAdapter
    def self.check_using_old_sidekiq_scheduler_config!(sidekiq_config)
      %i[enabled dynamic dynamic_every schedule listened_queues_only rufus_scheduler_options].each do |option|
        if SIDEKIQ_GTE_7_0_0
          if sidekiq_config.key?(option)
            Rails.logger.info ":#{option} option should be under the :scheduler: key"
          end
        elsif SIDEKIQ_GTE_6_5_0
          unless sidekiq_config[option].nil?
            Rails.logger.info ":#{option} option should be under the :scheduler: key"
          end
        else
          if sidekiq_config.options.key?(option)
            Rails.logger.info ":#{option} option should be under the :scheduler: key"
          end
        end
      end
    end
  end
end

I didn't test the code above, but that should give you some direction

from sidekiq-scheduler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.