Proca.Server.Notify (proca v3.4.1)

Server that decides what actions should be done after different events.

Beside running operations in proca, two event mechanisms are used:

  • GraphQL subscriptions mechanism (only for notifying about action page creation/update)
  • Sending a special event into the delivery queue (see Proca.Stage.Event).

Please note that at the time of writing, this notification event system is very partial.

Events and their consequences:

  • Org is created

    • create queues for the org
  • Action page is created

    • inform the actionPageUpserted subscription API about new page
  • Request from partner to turn an action page live:

    • send email to lead staffers
  • Org is updated

    • restart the queues (they might need reconfiguration)
    • if Org is instance org, resstart all queues (instance org settings affect all of them)
  • Action page is updated

    • inform the actionPageUpserted subscription API about new page
  • Public key is activated

    • Updated the public key in Keys dictionary process
  • Campaign is updated

    • Send an event to owner org (campaign_updated event)
  • Campaign is upserted

    • run actions for updating or creation of campaign and all of its pages
  • Supporter email_status is updated (DOI or hard bounce, etc)

    • Send an event to orgs event queue (so they are informed about this) (email_status event)
  • Email tempalte is updated

    • refresh the cashed email template
  • Org is deleted

    • Stop queue workers for the org
  • Action is added

Link to this section Summary

Link to this section Functions

Link to this function

created(record, opts \\ [])

Notifications on creation of record

Link to this function

deleted(record, opts \\ [])

Notifications on deletion of record

Link to this function

key_activated(key)

Link to this function

multi(op, records, opts \\ [])

Link to this function

restart_org_pipes(org)

Link to this function

send_confirm_as_event(cnf, org_id)

Link to this function

send_confirm_by_email(cnf, org)

Link to this function

start_org_pipes(org)

Link to this function

stop_org_pipes(org)

Link to this function

updated(record, opts \\ [])

Notifications on update of record