It’s more like a self-note, but also an answer to a question what I like to monitor on the servers where we run Rails apps and how. Thought that it could save some time to anyone. Let me know if you have any questions. I like to create the directory for Monit configuration bits and keep different services separate. It easier to update and reuse this way. First comes some trivial stuff. You’ll noti
I set up Resque for our startup over the last few days, to put some log analysis stuff in the background. It was harder than I thought it should be, largely due to a lack of documentation for compatibility with common tools like Capistrano and daemon kickoff tools. Here’s how I did it. Step 1: Install Redis. This part’s easy on OS X: I already had Redis running for some other tasks on the server,
Introduction SponsorPay is a global cross-platform advertising solution for the monetization of premium content or virtual currency. This means that our application sits in between advertising networks, publishers and users. A critical part of this operation is communicating the users actions to the publishers and advertising networks. These communications (callbacks) are, more often than not, slo
このウェブサイトは販売用です! twiwt.org は、あなたがお探しの情報の全ての最新かつ最適なソースです。一般トピックからここから検索できる内容は、twiwt.orgが全てとなります。あなたがお探しの内容が見つかることを願っています!
Redis のインストール https://github.com/defunkt/resque を参照。 git clone git://github.com/defunkt/resque.git cd resque rake redis:install dtach:install rake redis:start gem install bundler bundle install モニタリング用管理Webアプリ resqueのgitレポジトリの中の管理アプリケーションを起動する。 cd resque/examples/demo rackup config.ru ブラウザで http://localhost:9292/ のようにアクセスすることでアプリケーションが実行できる。 rails 3 で resque を使う Gemfile を編集する vi Gemfile 以下の一行を
GitHubで開発,利用されている https://github.com/resque/resque 組込まれているwebビューが見やすく,失敗したタスクのリトライや削除もできるようになっている. Resqueを使ってTwitterに投稿するのは以下のように書く # tweet.rb require 'twitter' class Tweet @queue = :post_to_twitter def self.perform(oauth_id, msg) oauth = Oauth.find(oauth_id) Twitter.configure do |config| config.consumer_key = CONSUMER_KEY config.consumer_secret = CONSUMER_SECRET config.oauth_token = oauth.token c
Railsアプリケーションの中で非同期処理(バッチ処理)を実現したいことがあります。例えば、こんな場合です。 ユーザーが「送信」ボタンを押したら数千通のメールを送る。 数千通のメールを送るにはかなり時間がかかるので、その処理は後回しにして、ユーザーにはすぐにレスポンスを返したいところです。 非同期処理を行うためのRubyライブラリとしてはBackgrounDRbやdelayed_jobなどが有名ですが、もう一つ有望な選択肢としてResqueというのがあることを最近知りました。 と言っても、私が知らなかっただけで、RubyGems.orgによれば11万回以上もダウンロードされている有名なライブラリです。昨年(2010年)1月に書かれた、あるブログ記事には詳しい評価が載っています。 以下、私の試用報告を書きます。なお、OSはUbuntu 10.04(LTS)、Railsのバージョンは3.0.5
先日の記事(Resqueを利用したRailsでの非同期処理/バッチ処理)の続きです。 簡単に振り返っておきましょう。今、localhost:3000でRailsアプリが動いています。ユーザーが/hello/worldにアクセスすると、すぐにレスポンスが返ってきます。しかし、数秒経過すると専用のログにテキストが書き込まれます。こういう仕組みを作りました。 この仕組みの鍵になるのが、Resqueというライブラリです。Railsアプリ側でクラスメソッドResque.enqueueを呼ぶと、非同期で実行したい処理(ジョブ)を登録できます。他方、Railsアプリとは別のプロセスでResqueワーカーというものが動いていて、数秒ごとに新しいジョブが登録されていないか監視しています。新しいジョブを見つけると、それを実行して、また監視作業に戻ります。 さて、前回はターミナルで resque:work とい
Resque は GitHub で開発/運用している、バックグラウンドジョブを作り・複数のキューに配置し・それらを後で処理するための、裏に Redis を採用したライブラリ。 Resque is a Redis-backed library for creating background jobs, placing those jobs on multiple queues, and processing them later. Introducing Resque - GitHub defunkt's resque at master - GitHub GitHub のブログ記事から、Resque の背景をメモ。 バックグランドジョブは、perform に応答できる Ruby のクラスかモジュール。 これまで 10m (10 million?) のジョブを処理してきたとの事。 GitHu
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く