Browse Source

feat: start queue when in iex and QUEUE=true

pull/48/head
Inhji Y. 12 months ago
parent
commit
24c14cea8c
  1. 10
      apps/tomie/lib/tomie/application.ex

10
apps/tomie/lib/tomie/application.ex

@ -21,9 +21,13 @@ defmodule Tomie.Application do
# Prevent running queues or scheduling jobs from an iex console.
if Code.ensure_loaded?(IEx) and IEx.started?() do
opts
|> Keyword.put(:crontab, false)
|> Keyword.put(:queues, false)
if System.get_env("QUEUE") == nil do
opts
|> Keyword.put(:crontab, false)
|> Keyword.put(:queues, false)
else
opts
end
else
opts
end

Loading…
Cancel
Save