Current section

Files

Jump to
verk_web web views queues_view.ex
Raw

web/views/queues_view.ex

defmodule VerkWeb.QueuesView do
use VerkWeb.Web, :view
def enqueued_jobs(jobs) do
Enum.map jobs, fn job ->
%{
jid: job.jid,
class: job.class,
args: job.args |> inspect,
job: job
}
end
end
def jobs(running_jobs) do
Enum.map running_jobs, fn running_job ->
job = running_job.job
%{
jid: job.jid,
started_at: running_job.started_at |> DateTime.to_string,
class: job.class,
args: job.args |> inspect,
job: job
}
end
end
end