0

I have two servers: web server (front-end) and analytic (backend) server. I need to pass a job from front-end server to back-end server through Sidekiq.

My hack is:

  1. Install Sidekiq in both web server and backend server. I now have front-end Sidekiq and back-end Sidekiq.
  2. Configure front-end Sidekiq so that it points to Redis server of the back-end Sidekiq. In other words, two Sidekiq shares the same Redis database server.

Now, I need to enqueue a job from front-end Sidekiq, then execute a code from back-end Sidekiq.

How I should go about doing it?

4

1 回答 1

1

Sidekiq 是一个分布式消息队列,它的全部目的是用于您描述的用例。只需设置一个队列供前端读取,并设置一个队列供后端读取。当您从前端队列中读取它时,将其插入回后端队列。

于 2013-09-21T15:05:58.783 回答