roger_ui v0.1.9 RogerUI.Jobs

Generates a Jobs list from Roger.Info.running_jobs() function. Resulting Jobs are linked to a partition name:

Given a nested data structure, where each element contents nested items: [

"watcher@127.0.0.1": %{
  "roger_demo_partition" => [
    %Roger.Job{
      args: %{"country" => "Venezuela", "email" => "janedoe@gmail.com", "name" => "Jane Doe", "number_of_pets" => 966},
      execution_key: nil, id: "16ovjr39jvijf4kgrlqe2ib2aadojhid", module: RogerDemo.Job.CreateUpdateUser,
      queue_key: nil, queued_at: 1517697586453, retry_count: 0, started_at: 1517697682999
    }

]]

return a sorted Map with the following structure: [ %Roger.Job{ args: %{

"country" => "Venezuela",
"email" => "janedoe@gmail.com",
"name" => "Jane Doe",
"number_of_pets" => 966

}, execution_key: nil, id: “16ovjr39jvijf4kgrlqe2ib2aadojhid”, module: RogerDemo.Job.CreateUpdateUser, queue_key: nil, queued_at: 1517697586453, retry_count: 0, started_at: 1517697682999 }]

Link to this section Summary

Functions

Takes a Keyword list with nodes, partitions and jobs like this

Link to this section Functions

Link to this function normalize(jobs)

Takes a Keyword list with nodes, partitions and jobs like this:

[

"watcher@127.0.0.1": %{
   "roger_demo_partition" => [
      %Roger.Job{
        args: %{"country" => "Venezuela", "email" => "janedoe@gmail.com", "name" => "Jane Doe",
        "number_of_pets" => 966},execution_key: nil, id: "16ovjr39jvijf4kgrlqe2ib2aadojhid",
        module: RogerDemo.Job.CreateUpdateUser,queue_key: nil, queued_at: 1517697586453,
        retry_count: 0,started_at: 1517697682999
      },

]…

and transforms it into a list of jobs with the partition name in it.