ExqUI provides a UI dashboard for Exq, a job processing library compatible with Resque / Sidekiq for the Elixir language. ExqUI allow you to see various job processing stats, as well as details on failed, retried, scheduled jobs, etc.
See Exq for using the Exq library. This assumes you have an instance of Redis.
Add exq_ui to your mix.exs deps (replace version with the latest hex.pm package version):
defp deps do
[
# ... other deps
{:exq_ui, "~> 0.9.0"}
]
end
Then run mix deps.get
.
Make sure to load exq_ui
def application do
[mod: {OperationSpectrum, []},
applications: [
:phoenix,
# ... other deps
:phoenix_ecto,
:postgrex,
:exq,
:exq_ui
]
]
end
For Elixir 1.2 or older, you will need to use Exq version 0.7.2 in hex, and you will also need to add :tzdata
to your application list.
By default, Exq will use configuration from your config.exs file. You can use this to configure your Redis host, port, password, as well as namespace (which helps isolate the data in Redis).
config :exq,
host: "127.0.0.1",
port: 6379,
password: "optional_redis_auth",
namespace: "exq",
concurrency: :infinite,
queues: ["default"],
poll_timeout: 50,
scheduler_poll_timeout: 200,
scheduler_enable: true,
max_retries: 25
There are also a few configuration options for the UI:
config :exq_ui,
web_port: 4040,
web_namespace: "",
server: true
The webport configures which port to start the UI on, and the web_namespace configures what to use as the application root
(both when using mix exq.ui
).
By default the empty namespace is used, so you can access the UI via: http://localhost:4040/
.
When setting a different web_namespace, for example exq_ui
, you can access the UI via: http://localhost:4040/exq_ui
.
The server
option allows you to refrain from starting the web server during tests. It is set to true
by default.
This is a screenshot of the UI Dashboard provided by Exq UI:
To start the web UI:
> mix exq.ui
To use this with Plug, edit your router.ex and add this section:
...
pipeline :exq do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :put_secure_browser_headers
plug ExqUi.RouterPlug, namespace: "exq"
end
scope "/exq", ExqUi do
pipe_through :exq
forward "/", RouterPlug.Router, :index
end
For issues, please submit a Github issue with steps on how to reproduce the problem.
For questions, stop in at the #elixir-lang Slack group
Contributions are welcome. Tests are encouraged.
By default, a static distribution of the UI is used. To run the UI and automatically build the JS distribution on changes, run:
> cd priv/ember
> npm install
> bower install
> ./node_modules/ember-cli/bin/ember server
To run tests / ensure your changes have not caused any regressions:
mix test --no-start
Justin McNally (j-mcnally) (structtv)
Nick Sanders (nicksanders)
Nick Gal (nickgal)
pdilyard (Paul Dilyard)
Alexander Shapiotko (thousandsofthem)
Matt Ward (theRealWardo)
Lin He (he9lin)