rails/solid_queue

SolidQueue dont detect recurring tasks

Closed this issue · 2 comments

I dont know why but SolidQueue dont detect recurring tasks from solid_queue.yml. I can enqueue a job and process them like DemoJob.perform_later and the queue record will be created in database (I use a separate DB). Everuthing fine but rails solid_queue:start didnot detect any recurring tasks in solid_queue.yml. I tried to keep the default configs but nothing work for me.

Here is my solid_queue.yml:

default: &default
  dispatchers:
    - polling_interval: 1
      batch_size: 500
      recurring_tasks:
        my_periodic_job:
          class: DemoJob
          schedule: every second
  workers:
    - queues: "*"
      threads: 5
      processes: 1
      polling_interval: 0.1

development:
 <<: *default

test:
 <<: *default

production:
 <<: *default

Here is my database.yml:

default: &default
  adapter: postgresql
  encoding: unicode
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>

  username: <%= ENV.fetch("POSTGRES_USERNAME") { "postgres" } %>
  password: <%= ENV.fetch("POSTGRES_PASSWORD") { "password" } %>
  host: <%= ENV.fetch("POSTGRES_HOST") { "0.0.0.0" } %>
  port: <%= ENV.fetch("POSTGRES_PORT") { "5432" } %>
  
solid: &solid
  <<: *default
  migrations_paths: db/solid_migrate
development:
  primary:
    <<: *default
    database: skyceer_development
  solid:
    <<: *solid
    database: solid
test:
  <<: *default
  database: skyceer_test

production:
  <<: *default
  database: skyceer_development

Here is log from rails solid_queue:start

[SolidQueue] Starting Dispatcher(pid=16426, hostname=skyler-dell, metadata={:polling_interval=>1, :batch_size=>500})
[SolidQueue] Starting Worker(pid=16430, hostname=skyler-dell, metadata={:polling_interval=>0.1, :queues=>"*", :thread_pool_size=>5})

I just figure it out the problem is that the different between v0.2 vs v0.3. v0.3 add create_recurring_executions.solid_queue migration and everything still fine!

rosa commented

Thank you 🙌