Proca.Stage.Support (proca v3.4.1)

Support functions for job processing in Broadway. Most imporatntly functions to build RabbitMQ events containing enough data to be processed internally (system) or externally (custom).

Link to this section Summary

Link to this section Functions

Link to this function

action_data(action, stage \\ :deliver, org_id \\ nil)

Link to this function

action_stage(action)

Link to this function

bulk_actions_data(action_ids, stage \\ :deliver, org_id \\ nil)

Link to this function

camel_case_keys(map)

Turn the case of keys in the map to camel case

Link to this function

confirm_link(confirm, op)

Link to this function

double_opt_in_link(action)

Link to this function

double_opt_in_link(action_id, contact_ref)

Link to this function

ensure_string(a)

Link to this function

failed_partially(messages, statuses)

Link to this function

flatten_keys(map, nil_to \\ nil)

Flattens the nested map keys so that there is only one nesting level of keys and values. The resulting keys are joined by underscore to form a snake-case key name.

Link to this function

ignore(message, reason \\ "ignored")

Link to this function

stringify_keys(map)

Convert map atom keys to strings

Link to this function

supporter_link(action, op)

Link to this function

supporter_link(action_id, contact_ref, op)

Link to this function

times_retried(arg1)

Unpack this AMQP metadata headers: [ {"x-death", :array,

[
  table: [
    {"count", :long, 55613},
    {"exchange", :longstr, "org.320.deliver"},
    {"queue", :longstr, "cus.320.deliver"},
    {"reason", :longstr, "rejected"},
    {"routing-keys", :array, [longstr: "register.fur_free_europe"]},
    {"time", :timestamp, 1664450213}
  ],
  table: [
    {"count", :long, 55612},
    {"exchange", :longstr, "org.320.fail"},
    {"queue", :longstr, "org.320.fail"},
    {"reason", :longstr, "expired"},
    {"routing-keys", :array, [longstr: "cus.320.deliver"]},
    {"time", :timestamp, 1664450243}
  ]
]},

{"x-first-death-exchange", :longstr, "org.320.deliver"}, {"x-first-death-queue", :longstr, "cus.320.deliver"}, {"x-first-death-reason", :longstr, "rejected"} ],

Link to this function

to_iso8601(naivedatetime)

Link to this function

too_many_retries?(msg)