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
- inform the
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
- inform the
Public key is activated
- Updated the public key in Keys dictionary process
Campaign is updated
- Send an event to owner org (
campaign_updated
event)
- Send an event to owner org (
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)
- Send an event to orgs event queue (so they are informed about this) (
Email tempalte is updated
- refresh the cashed email template
Org is deleted
- Stop queue workers for the org
Action is added
- Increment actions by one in Stats process
- Start action processing
- Store last action page status (its location and that it's active) in Proca.ActionPage.Status.
Link to this section Summary
Functions
Notifications on creation of record
Notifications on deletion of record
Notifications on update of record
Link to this section Functions
created(record, opts \\ [])
Notifications on creation of record
deleted(record, opts \\ [])
Notifications on deletion of record
key_activated(key)
multi(op, records, opts \\ [])
restart_org_pipes(org)
send_confirm_as_event(cnf, org_id)
send_confirm_by_email(cnf, org)
start_org_pipes(org)
stop_org_pipes(org)
updated(record, opts \\ [])
Notifications on update of record