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

Skip starting Judoscale reporter on rails runner process #217

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

carlosantoniodasilva
Copy link
Member

@carlosantoniodasilva carlosantoniodasilva commented Oct 7, 2024

Similar to when running the rails console, we want to skip the reporter on rails runner to prevent it initializing another background thread and triggering an API call to our backend when executing one-off commands via the runner.

console: https://github.com/rails/rails/blob/a2f2dc8afd38b2d4ebd0170a75be2910fd7e4e45/railties/lib/rails/commands/console/console_command.rb
runner: https://github.com/rails/rails/blob/a2f2dc8afd38b2d4ebd0170a75be2910fd7e4e45/railties/lib/rails/commands/runner/runner_command.rb

Similar to when running the `rails console`, we want to skip the
reporter on `rails runner` to prevent it initializing another background
thread and triggering an API call to our backend when executing one-off
commands via the runner.
Copy link
Collaborator

@adamlogic adamlogic left a comment

Choose a reason for hiding this comment

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

Not sure if test failure is legit or not, but the code looks good. 👍

@carlosantoniodasilva
Copy link
Member Author

I think it's a solid queue issue with not requiring the proper ActiveModel module they rely on... it's not a problem in a Rails app I don't think, but for us that require only the lib via solid_queue it seems to be complaining.

I will do a little more investigation, while I think it's something that should be fixed there, we could potentially require the missing file on our side.

@carlosantoniodasilva carlosantoniodasilva merged commit 111830b into main Oct 7, 2024
119 of 124 checks passed
@carlosantoniodasilva carlosantoniodasilva deleted the ca-skip-judoscale-rails-runner branch October 7, 2024 16:48
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.

2 participants