...to be retried. Our two main mechanisms for background processing are cronjobs (managed with whenever) and job queues (ActiveJob, usually with GoodJob). Important Work on this lesson in builder mode...
...has committed, and how to do it right. You can schedule a cronjob with whenever, and explain what each run costs and on which servers it should run.
📄 TMDB API: getting started — free for non-commercial use with an API key 📄 whenever — cron jobs written in Ruby 📄 Faking and testing the network with WebMock — our card
...RSS gem for the purpose of this card. Update it once a day (using whenever) Tip Consider the best place to put the new logic. Should it be an existing...
...we simply log into the production server's SQL console and alter tables there whenever we need a change? How do we need to work with migrations when we change...
...exercise, please don't use the :counter_cache option and do everything manually instead. Whenever you add a new column you need to take care of existing records. Add a...
You have the following HTML structure:
If you want to run Javascript code whenever someone clicks on a ...
..., you can do this in three different ways: function code(event...
...the game is to click on the currently visible mole as fast as possible. Whenever the user clicks within the arena, the moles are randomly hidden or shown.
...not implement sending a welcome e-mail, send an e-mail now. In MovieDB, whenever someone creates a movie, send a notification to moviedb-admin@example.com. Can you attach the movie's...
...your mentor is both your customer and your code reviewer. Ping them in Slack whenever you think it's their turn in the process. For the genre change, have a...
...no separate build process in development. Instead the Rails server directly compiles the asset whenever it renders a javascript_tag, stylesheet_tag or image_tag. It still has issues on...
...is proof, not opinion. The experiment is the strongest of the four. Prefer it whenever the question is "does this actually work?". Using documentation to learn Reference documentation is still...
...Exception Notification We are using the exception_notification gem to receive an e-mail whenever one of our apps raises an unhandled exception. Look through the repo and understand how...
...with a text/plain content type. Write a Middleware that prints OUCH to the screen whenever the Rails application raises an unhandled error...
Best results in other decks
Whenever is a Ruby gem that provides a nicer syntax for writing and deploying cron jobs. Leading zeros are important for whenever if you use the 24-hours format!
...must always run on all servers. E.g. starting a sidekiq process on reboot. Configuring whenever Warning Caution: this effectively removes redundancy! When your "primary cron" is down (e.g. for maintenance...
...run. You might need to handle this. If not configured otherwise, cronjobs defined in whenever's schedule.rb will only be written to the crontab of the server with the db...