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

[Docs] Minor example error in workers #595

Closed
rromanchuk opened this issue Jun 7, 2017 · 1 comment
Closed

[Docs] Minor example error in workers #595

rromanchuk opened this issue Jun 7, 2017 · 1 comment

Comments

@rromanchuk
Copy link
Contributor

I don't think you meant to use the symbol :user_id, instead you probably meant the local scoped var user_id

class NotificationJob
  include Sidekiq::Worker

  def perform(user_id)
    Rollbar.scope!(:person => { :id => :user_id })

    # If this next line causes an exception, the reported exception (which will
    # be reported by Rollbar's standard Sidekiq instrumentation) will also
    # include the above person information.
    Notification.send_to_user(user_id)
  end
end

It's funny, i noticed i had the user "user_id" causing a majority of the error in my workers, turns out i'm an idiot and just copy and pasted from this example.

@rromanchuk
Copy link
Contributor Author

#596

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

No branches or pull requests

1 participant