Chris, another great episode! At the moment I have this in my Procfile: worker: bundle exec sidekiq -c 5 -q default -q mailers, since the only type of worker in my app is the mailer worker. At the moment it's not totally clear for me when/how I have to define the type of the worker. Let's say I would add another type (not mailer) of job to my app, but I don't want to scale my heroku dyno up since my one worker dyno has enough capacity to do both the mailer type and the other type of bg job. Could you tell me how you deal with that? I hope you will publish more videos about getting apps production ready on heroku :)
Great question. I would actually remove the queues you listed and then Sidekiq will process everything by default. You don't really need to separate out queues until you have so much background work happening that it makes sense to separate and prioritize them.
I have a problem with heroku.
It seems like every time I make changes to the migrations and run git push heroku master, heroku run rake db:migrate, I get an error in development when opening the current user's profile. All existing users seem to have this problem, while the new users after the migration update work well. This means that I would have to delete the existing users and recreate them, but that would not be possible if actual users use the app.
Is there a way to fix this without having to delete the existing users after every migration update on heroku?
I get the we're sorry, but something went wrong message. It does not exactly say what is wrong. However, I deleted the existing users and the new users work well. I am asking mostly because I will be adding new migrations again for the users and might run into the same problem again.
There are no validations I have added or anything of that sort where there might be a nil where there shouldn't be.
I was mostly wondering if there was another step to take when adding new migrations in development after adding them in production.
You'll want to check your Heroku logs to find out what crashed when you get the "Something Went Wrong" 500 error. It will tell you what code crashed.
If you deploy new migrations, you'll need to also run
heroku run rails db:migrate to make sure production gets the new database changes as well.
Join 30,242+ developers who get early access to new screencasts, articles, guides, updates, and more.