Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Supervisor only when puma is fully booted. #86

Merged
merged 1 commit into from
Dec 26, 2023

Conversation

nashby
Copy link
Contributor

@nashby nashby commented Dec 23, 2023

To be able to use app's code we need to wait for puma to boot before we start SolidQueue's supervisor.

closes #77

@nashby
Copy link
Contributor Author

nashby commented Dec 23, 2023

@rosa I'm having hard time trying to update Gemfile.lock. For some reason I always get such changes:

-    sqlite3 (1.5.4)
-    mini_portile2 (~> 2.8.0)
+    sqlite3 (1.5.4-arm64-darwin)
+    sqlite3 (1.5.4-x86_64-linux)

so please let me know if you know how to fix it or you can try to update it yourself (we need to add puma to Gemfile.lock)

@justinko
Copy link
Contributor

@nashby Here's the updated Gemfile.lock that includes Puma:

PATH
  remote: .
  specs:
    solid_queue (0.1.1)
      rails (>= 7.0.3.1)

GEM
  remote: https://rubygems.org/
  specs:
    actioncable (7.1.0)
      actionpack (= 7.1.0)
      activesupport (= 7.1.0)
      nio4r (~> 2.0)
      websocket-driver (>= 0.6.1)
      zeitwerk (~> 2.6)
    actionmailbox (7.1.0)
      actionpack (= 7.1.0)
      activejob (= 7.1.0)
      activerecord (= 7.1.0)
      activestorage (= 7.1.0)
      activesupport (= 7.1.0)
      mail (>= 2.7.1)
      net-imap
      net-pop
      net-smtp
    actionmailer (7.1.0)
      actionpack (= 7.1.0)
      actionview (= 7.1.0)
      activejob (= 7.1.0)
      activesupport (= 7.1.0)
      mail (~> 2.5, >= 2.5.4)
      net-imap
      net-pop
      net-smtp
      rails-dom-testing (~> 2.2)
    actionpack (7.1.0)
      actionview (= 7.1.0)
      activesupport (= 7.1.0)
      nokogiri (>= 1.8.5)
      rack (>= 2.2.4)
      rack-session (>= 1.0.1)
      rack-test (>= 0.6.3)
      rails-dom-testing (~> 2.2)
      rails-html-sanitizer (~> 1.6)
    actiontext (7.1.0)
      actionpack (= 7.1.0)
      activerecord (= 7.1.0)
      activestorage (= 7.1.0)
      activesupport (= 7.1.0)
      globalid (>= 0.6.0)
      nokogiri (>= 1.8.5)
    actionview (7.1.0)
      activesupport (= 7.1.0)
      builder (~> 3.1)
      erubi (~> 1.11)
      rails-dom-testing (~> 2.2)
      rails-html-sanitizer (~> 1.6)
    activejob (7.1.0)
      activesupport (= 7.1.0)
      globalid (>= 0.3.6)
    activemodel (7.1.0)
      activesupport (= 7.1.0)
    activerecord (7.1.0)
      activemodel (= 7.1.0)
      activesupport (= 7.1.0)
      timeout (>= 0.4.0)
    activestorage (7.1.0)
      actionpack (= 7.1.0)
      activejob (= 7.1.0)
      activerecord (= 7.1.0)
      activesupport (= 7.1.0)
      marcel (~> 1.0)
    activesupport (7.1.0)
      base64
      bigdecimal
      concurrent-ruby (~> 1.0, >= 1.0.2)
      connection_pool (>= 2.2.5)
      drb
      i18n (>= 1.6, < 2)
      minitest (>= 5.1)
      mutex_m
      tzinfo (~> 2.0)
    base64 (0.1.1)
    bigdecimal (3.1.4)
    builder (3.2.4)
    concurrent-ruby (1.2.2)
    connection_pool (2.4.1)
    crass (1.0.6)
    date (3.3.3)
    debug (1.7.1)
      irb (>= 1.5.0)
      reline (>= 0.3.1)
    drb (2.1.1)
      ruby2_keywords
    erubi (1.12.0)
    globalid (1.2.1)
      activesupport (>= 6.1)
    i18n (1.14.1)
      concurrent-ruby (~> 1.0)
    io-console (0.6.0)
    irb (1.6.2)
      reline (>= 0.3.0)
    loofah (2.21.4)
      crass (~> 1.0.2)
      nokogiri (>= 1.12.0)
    mail (2.8.1)
      mini_mime (>= 0.1.1)
      net-imap
      net-pop
      net-smtp
    marcel (1.0.2)
    mini_mime (1.1.5)
    mini_portile2 (2.8.1)
    minitest (5.20.0)
    mocha (2.1.0)
      ruby2_keywords (>= 0.0.5)
    mutex_m (0.1.2)
    mysql2 (0.5.4)
    net-imap (0.4.1)
      date
      net-protocol
    net-pop (0.1.2)
      net-protocol
    net-protocol (0.2.1)
      timeout
    net-smtp (0.4.0)
      net-protocol
    nio4r (2.5.9)
    nokogiri (1.15.4-arm64-darwin)
      racc (~> 1.4)
    nokogiri (1.15.4-x86_64-linux)
      racc (~> 1.4)
    pg (1.5.4)
    puma (6.4.0)
      nio4r (~> 2.0)
    racc (1.7.1)
    rack (3.0.8)
    rack-session (2.0.0)
      rack (>= 3.0.0)
    rack-test (2.1.0)
      rack (>= 1.3)
    rackup (2.1.0)
      rack (>= 3)
      webrick (~> 1.8)
    rails (7.1.0)
      actioncable (= 7.1.0)
      actionmailbox (= 7.1.0)
      actionmailer (= 7.1.0)
      actionpack (= 7.1.0)
      actiontext (= 7.1.0)
      actionview (= 7.1.0)
      activejob (= 7.1.0)
      activemodel (= 7.1.0)
      activerecord (= 7.1.0)
      activestorage (= 7.1.0)
      activesupport (= 7.1.0)
      bundler (>= 1.15.0)
      railties (= 7.1.0)
    rails-dom-testing (2.2.0)
      activesupport (>= 5.0.0)
      minitest
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.6.0)
      loofah (~> 2.21)
      nokogiri (~> 1.14)
    railties (7.1.0)
      actionpack (= 7.1.0)
      activesupport (= 7.1.0)
      irb
      rackup (>= 1.0.0)
      rake (>= 12.2)
      thor (~> 1.0, >= 1.2.2)
      zeitwerk (~> 2.6)
    rake (13.0.6)
    reline (0.3.2)
      io-console (~> 0.5)
    ruby2_keywords (0.0.5)
    sqlite3 (1.5.4)
      mini_portile2 (~> 2.8.0)
    thor (1.2.2)
    timeout (0.4.0)
    tzinfo (2.0.6)
      concurrent-ruby (~> 1.0)
    webrick (1.8.1)
    websocket-driver (0.7.6)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.5)
    zeitwerk (2.6.12)

PLATFORMS
  arm64-darwin-22
  x86_64-linux

DEPENDENCIES
  debug
  mocha
  mysql2
  pg
  puma
  solid_queue!
  sqlite3

BUNDLED WITH
   2.4.2

@justinko
Copy link
Contributor

@nashby I can reproduce your issue with Ruby 3.0.3 ... try 3.2.2 and it should resolve.

@nashby
Copy link
Contributor Author

nashby commented Dec 26, 2023

@justinko indeed, thanks!

end

teardown do
Process.kill 'INT', @pid
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A super minor nit, just to match other usages in the codebase:

Suggested change
Process.kill 'INT', @pid
Process.kill :INT, @pid

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed!

Copy link
Member

@rosa rosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you so much! 🙌

@rosa rosa merged commit 5b1ba0b into rails:main Dec 26, 2023
@nashby nashby deleted the puma-plugin branch December 26, 2023 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Puma plugin :solid_queue throws an error on start
3 participants