問題タブ [php-resque]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
resque - resque での複数のキューと複数のジョブ
私は resque を使用して、2 種類のジョブをバックグラウンド処理しています。
2 つのジョブは並行して処理できますが、各ジョブ タイプ自体は順番にしか処理できません。たとえば、DB 操作は順番に実行する必要がありますが、サード パーティの API 要求と並行して実行できます。
これを実行するには、次のいずれかの方法を検討しています。
2 つのアプローチの違いと、どちらを採用するのがより良いアプローチかを知りたいと思います。
php - Queuing data to redis with php-resque is slow
I'm using php-resque for queuing my jobs. And I'm doing apache ab tool to benchmark my performance.
php-resque
does good job, but it's slow as every time my it connects to redis which impacts performance (without connection it handles ~130 Requests/sec
and with Resque::enqueue
it's ~30 requests/sec
).
So I was thinking to pass data to another file through exec
which will connect redis and queus job in the background, but found that exec
is way much slow.
What is next ? How can I make it handle redis queuing faster.
Note: I'm using this command to test performance.
jobs - mjphaynes/php-resque Class not found エラー
mjphaynes/php-resque lib (リンク) を使用して、php アプリケーションのジョブを実行しています。composer を使用してこれをインストールし、アプリと統合しました。構文を使用してジョブをプッシュできますResque::push('MyJob', array('arg1', 'arg2'));
(テーブルと redis データベースに jobIds/tokens で作成されたジョブが表示されます)。ワーカーは、構文 を使用して正常に実行されますbin/resque worker:start
。APP_INCLUDE
私が直面している問題は、ワーカーを実行してジョブを処理するときに Class not found エラーが発生することです。ワーカーが言及されたジョブ クラス ファイルを見つけることができるパスを設定するのを手伝ってくれる人はいますか。
注: php アプリケーションは、手続き型/コア php (フレームワークなし) で構築されています。したがって、ワーカーを実行するのは難しいと思います。
どんな助けでも本当に感謝しています。ありがとう。