sineed / exq_sidekiq_demo_app

Example of communication between Exq and Sidekiq

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example of communication between Sidekiq and Exq

Exq can work alongside Sidekiq. This demo app shows how to construct communication between these tools.

The aim is to have a Sidekiq as a client that creates jobs and Exq a a server that processes these jobs.

There are two applications here:

  1. rails_app
  2. elixir_app

To start you must pass these steps:

  1. in Rails app:
  • cd rails_app
  • bundle install (loads all dependencies)
  • rails s (launches rails server on localhost:3000 by default)
  1. in Elixir app:
  • cd elixir_app
  • mix deps.get (loads all dependencies)
  • mix run --no-halt (runs our application and does not halt it so we can see IO.puts calls defined in ElixirApp.JobWorker)
  1. curl -X POST -F "job[id]=1" -F "job[title]=test213" -F "job[value]=123" 'http://localhost:3000/jobs'

In console with hanging elixir app you must see JobWorker called with id: 1, title: test213, value: 123

About

Example of communication between Exq and Sidekiq

License:MIT License


Languages

Language:Ruby 63.9%Language:HTML 20.0%Language:Elixir 13.2%Language:CSS 2.9%