自分が担当するRailsアプリケーションでバックグラウンドジョブを動かす必要が出てきた。 Railsでバックグラウンドジョブといえば二大巨頭の Resque と Sidekiq があると思っている。どちらかといえば最近採用されているイメージがあるSidekiqに関して、どんなコードになっているか主要な部分をチェックしておきたい。 今回は、Railsにsidekiqを組み込んでジョブを登録する部分まで。Sidekiqを直接使ってジョブを登録する方法と、ActiveJob経由で登録する方法の2つを比べて見る。 まとめ Sidekiqを直接使用する場合、Redisのコネクションプールを用意しておき、それを使用して各Jobの情報をキューにpushしているだけ。ジョブの登録に関してはシンプルだった。 ActiveJob経由もバックエンドを抽象化している分、少しコードが複雑になっているが、やっているこ
Prologue Release Notes Upgrade Guide Contribution Guide Getting Started Installation Configuration Directory Structure Frontend Starter Kits Deployment Architecture Concepts Request Lifecycle Service Container Service Providers Facades The Basics Routing Middleware CSRF Protection Controllers Requests Responses Views Blade Templates Asset Bundling URL Generation Session Validation Error Handling L
This article was originally published on Chaps by Maciej Nowak, and with their permission, we are sharing it here for Codeship readers. Have you ever struggled with a chain of rake tasks that needed to be run periodically and their runtime was giving you a headache? Did you ask yourself how to save time by boosting execution along with readability for huge chunks of jobs? These questions are very
2015-10-14 Sidekiq has a reputation for being much faster than its competition but there’s always room for improvement. I recently rewrote its internals and made it six times faster. Here’s how! It’s been quite a while since I’ve touched Sidekiq’s core design. That was intentional: for the last year Sidekiq has stabilized and become reliable infrastructure that Ruby developers can trust when build
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く