Module Expr Str Assign NameStore ListLoad Str Str Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str Assign NameStore Num Expr Str Assign NameStore Num Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str ImportFrom alias Assign NameStore IfExp CompareIs NameLoad NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Yield Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If BoolOpAnd CompareLt Call NameLoad NameLoad NameLoad NameLoad body If CompareEq Call NameLoad NameLoad Num body Assign NameStore Yield Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad orelse Assign NameStore SubscriptLoad NameLoad Index Num If BoolOpOr CompareIs NameLoad NameLoad CompareEq AttributeLoad NameLoad attr Num body Raise Call AttributeLoad NameLoad attr NameLoad Assign NameStore IfExp NameLoad BinOpAdd AttributeLoad NameLoad attr Num Num Assign NameStore Yield Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad If UnaryOpNot NameLoad body Assign NameStore Yield Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad keyword NameLoad Raise Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Raise Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad GeneratorExp AttributeLoad NameLoad attr comprehension NameStore NameLoad FunctionDef arguments args NameParam defaults body If CompareIn NameLoad NameLoad body Return Dict Str ListLoad Call AttributeLoad NameLoad attr NameLoad orelse Return Dict Str ListLoad Dict Str Str NameLoad NameLoad decorator_list Expr Yield Call AttributeLoad NameLoad attr NameLoad NameLoad BinOpAdd NameLoad NameLoad NameLoad NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Expr Yield ListComp Call AttributeLoad NameLoad attr NameLoad Str NameLoad NameLoad comprehension NameStore NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict Str Dict Str Call AttributeLoad NameLoad attr NameLoad IfExp NameLoad Num NameLoad If NameLoad body Assign SubscriptStore SubscriptLoad NameLoad Index Str Index Str NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad NameLoad Str keyword NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict Str ListComp Dict Str Str SubscriptLoad NameLoad Index Str NameLoad comprehension NameStore NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad NameLoad Str keyword NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Expr Yield Call AttributeLoad NameLoad attr NameLoad Str NameLoad NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad Str NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Expr Yield ListComp Call AttributeLoad NameLoad attr NameLoad Str NameLoad NameLoad comprehension NameStore NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad Str NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam defaults body If CompareEq NameLoad AttributeLoad NameLoad attr body Return Dict Str ListLoad Call AttributeLoad NameLoad attr NameLoad orelse Return Dict Str ListLoad Dict Str Str NameLoad NameLoad decorator_list Expr Yield Call AttributeLoad NameLoad attr NameLoad NameLoad BinOpAdd NameLoad ListLoad NameLoad NameLoad NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad If CompareGt Call NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Num Num Assign NameStore Dict Str ListLoad Dict Str Str Str SubscriptLoad NameLoad Index Str NameLoad NameLoad orelse Assign NameStore NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str NameLoad NameLoad NameLoad keyword NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict Str ListLoad NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad NameLoad Str keyword NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str ImportFrom alias If BoolOpOr NameLoad NameLoad body Assign NameStore IfExp NameLoad Str Str Expr Yield Call AttributeLoad NameLoad attr NameLoad NameLoad SubscriptLoad NameLoad Index Str NameLoad If Call NameLoad GeneratorExp CompareNotEq NameLoad Str comprehension NameStore Call AttributeLoad NameLoad attr body Assign NameStore Dict Str ListLoad SubscriptLoad NameLoad Index Str Expr Yield Call AttributeLoad NameLoad attr NameLoad Str SubscriptLoad NameLoad Index Str NameLoad orelse If BoolOpOr NameLoad NameLoad body Expr Yield Call AttributeLoad NameLoad attr NameLoad Str SubscriptLoad NameLoad Index Str If NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Yield Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str NameLoad NameLoad decorator_list AttributeLoad NameLoad attr Expr Yield Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict Str Dict Str Call AttributeLoad NameLoad attr NameLoad IfExp NameLoad Num NameLoad If NameLoad body Assign SubscriptStore SubscriptLoad NameLoad Index Str Index Str NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad NameLoad Str keyword NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad FunctionDef arguments args NameParam defaults body If CompareIn NameLoad NameLoad body Return Dict Str ListLoad Dict Str Str NameLoad NameLoad orelse Return Dict Str ListLoad Dict Str Str NameLoad NameLoad decorator_list Expr Yield Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict Str ListComp Dict Str Str SubscriptLoad NameLoad Index Str NameLoad comprehension NameStore NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad NameLoad Str keyword NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict Str ListLoad Dict Str Str NameLoad NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad NameLoad Str keyword NameLoad keyword NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str If CompareGt Call NameLoad NameLoad Num body Assign NameStore Dict Str ListLoad Call AttributeLoad NameLoad attr NameLoad Expr Yield ListComp Call AttributeLoad NameLoad attr NameLoad NameLoad Str keyword NameLoad keyword NameLoad comprehension NameStore NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str ListComp Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str comprehension NameStore NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad NameLoad ListLoad NameLoad NameLoad NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str ListComp Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str comprehension NameStore NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Str ListLoad Dict Str Str NameLoad NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Dict Str ListLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Expr Yield Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str NameLoad NameLoad NameLoad keyword NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict Str ListLoad NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad Str NameLoad NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str ListComp Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str comprehension NameStore NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Str ListLoad Dict Str Str NameLoad NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str ListLoad Dict Str Str SubscriptLoad NameLoad Index Str NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict Str ListLoad SubscriptLoad NameLoad Index Str Expr Yield Call AttributeLoad NameLoad attr NameLoad AttributeLoad Call AttributeLoad NameLoad attr attr Str keyword NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore NameLoad Assign NameStore Dict Str ListLoad Dict Str Str NameLoad NameLoad If CompareIn Str NameLoad body Assign NameStore TupleLoad NameLoad SubscriptLoad NameLoad Index Str If CompareEq Call NameLoad NameLoad Num body Assign NameStore NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad AttributeLoad Call AttributeLoad NameLoad attr attr Str keyword NameLoad keyword NameLoad keyword NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad NameLoad Index Str If Call NameLoad GeneratorExp CompareNotIn NameLoad TupleLoad Str Str Str comprehension NameStore Call AttributeLoad NameLoad attr body Assign NameStore Dict Str ListLoad NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad Str SubscriptLoad NameLoad Index Str NameLoad orelse Assign NameStore Dict Str ListLoad SubscriptLoad NameLoad Index Str Expr Yield Call AttributeLoad NameLoad attr NameLoad NameLoad Str keyword NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str ListLoad Dict Str Str SubscriptLoad NameLoad Index Str NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str NameLoad NameLoad NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Expr Yield Call AttributeLoad NameLoad attr NameLoad Str NameLoad NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad Str NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict Str Dict Str Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad NameLoad Str keyword NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Dict Str ListLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Expr Yield Call AttributeLoad NameLoad attr NameLoad NameLoad ListLoad NameLoad NameLoad NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assert CompareIsNot AttributeLoad NameLoad attr NameLoad Str Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults vararg body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Yield Call NameLoad NameLoad NameLoad NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str NameLoad NameLoad Raise Call AttributeLoad NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Dict Str Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Dict Str Str Str NameLoad NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults body Expr Yield Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword NameLoad decorator_list AttributeLoad NameLoad attr Assign NameStore Dict Str Dict Str Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Yield Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Expr Yield Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword Dict Str ListLoad NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str ImportFrom alias FunctionDef arguments args NameParam defaults body Expr Yield Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list AttributeLoad NameLoad attr Expr Yield Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str If BoolOpAnd Call AttributeLoad NameLoad attr UnaryOpNot NameLoad body Return If BoolOpOr CompareIs NameLoad NameLoad Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad orelse Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Yield Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword BoolOpAnd NameLoad UnaryOpNot NameLoad If UnaryOpNot NameLoad body Expr Yield Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Yield Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call NameLoad GeneratorExp NameLoad comprehension NameStore NameLoad CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad AugAssignAdd AttributeStore NameLoad attr Num If CompareIsNot NameLoad NameLoad body AugAssignAdd AttributeStore NameLoad attr Num Assign NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign NameStore TupleLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore ListComp Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListComp Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr comprehension NameStore NameLoad Assign TupleStore NameStore NameStore NameStore Yield ListLoad NameLoad NameLoad NameLoad If CompareGt AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Yield ListLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad IfExp CompareIsNot NameLoad NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Yield ListComp Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Yield Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Raise Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad AttributeLoad NameLoad attr decorator_list
N/A N/A Viewfinder notification manager.

  The notification manager:

  1. Creates notifications for the various operations. Notifications allow the client to
     incrementally stay in sync with server state as it changes. Each operation triggers zero,
     one, or more notifications. Notifications can be created just for the triggering user, or
     for all friends of the user, or for those who have the user as a contact, etc.

     See the header to notification.py for more information about notifications.

  2. Creates activities for operations that modify viewpoint assets.

  3. Sends push alerts to client devices for operations that require them.
 N/A __authors__ N/A spencer@emailscrubbed.com (Spencer Kimball) andy@emailscrubbed.com (Andy Kimball) N/A json N/A logging tornado gen viewfinder.backend.base util viewfinder.backend.db.activity Activity viewfinder.backend.db.contact Contact viewfinder.backend.db.device Device viewfinder.backend.db.followed Followed viewfinder.backend.db.notification Notification viewfinder.backend.db.operation Operation viewfinder.backend.db.settings AccountSettings NotificationManager N/A object N/A N/A Viewfinder notification data object.

  Methods on this class may be safely called without acquiring a lock for the notified user.
  This is important, because operations from multiple other users might trigger the concurrent
  creation of notifications for the same user. This class contains race detection and retry
  logic to handle this case.

  Methods on this class assume that an operation is currently in progress and that
  Operation.GetCurrent() will return a valid operation. Various attributes of the notifications
  are based upon the current operation in order to make notification creation idempotent in case
  the operation restarts.

  Tricky cases to consider when making changes:
    - unshare: Can generate notifications on viewpoints to which the current user does not have
               access. This happens when the unshared photo(s) have been reshared.

    - update_follower: Modifies metadata returned by query_viewpoints, but since only follower
                       metadata is affected, no activity is created. This means that the
                       notification viewpoint_id is defined but the activity is not.
   N/A MAX_INLINE_COMMENT_LEN 512 N/A Maximum length of a comment message that will be in-lined in a NotificationManager. N/A _QUERY_LIMIT 100 N/A Maximum number of notifications returned by QuerySince. QuerySince N/A N/A cls client user_id device_id start_key limit scan_forward N/A None True N/A N/A Queries all notifications intended for 'user_id' with max 'limit' notifications since
    'start_key'. Creates a special "clear_badges" notification once all notifications have been
    queried. This resets the current badge counter and results in the push of an alert to all
    *other* devices so that their badge number can be updated to 0. If 'scan_forward' is false,
    then query in reverse (descending order), and do not set clear_badges.
     viewfinder.backend.op.alert_manager AlertManager N/A limit N/A N/A limit None N/A NotificationManager _QUERY_LIMIT limit N/A notifications N/A N/A N/A gen Task N/A Notification RangeQuery client hash_key user_id range_desc None limit limit col_names None excl_start_key start_key consistent_read True scan_forward scan_forward N/A N/A N/A N/A len notifications limit scan_forward N/A N/A N/A N/A len notifications 0 N/A N/A last_notification N/A N/A N/A Notification QueryLast client user_id consistent_read True N/A N/A last_notification N/A notifications N/A -1 N/A N/A N/A last_notification None N/A N/A last_notification badge 0 N/A N/A N/A N/A gen Return notifications N/A notification_id N/A last_notification N/A N/A last_notification notification_id 1 0 N/A success N/A N/A N/A Notification TryClearBadge client user_id device_id notification_id N/A N/A success N/A N/A results N/A N/A N/A NotificationManager QuerySince client user_id device_id start_key scan_forward scan_forward N/A N/A N/A gen Return results N/A N/A N/A AlertManager SendClearBadgesAlert client user_id exclude_device_id device_id N/A N/A N/A gen Return notifications N/A classmethod N/A gen coroutine NotifyAddFollowers N/A N/A cls client viewpoint_id existing_followers new_followers contact_user_ids act_dict timestamp N/A N/A N/A Notifies the specified followers that they have been added to the specified viewpoint.
    Invalidates the entire viewpoint so that the new follower will load it in its entirety.
    Also notifies all existing followers of the viewpoint that new followers have been added.
    Creates an add_followers activity in the viewpoint.
     N/A activity_func N/A N/A NotificationManager _CreateActivityFunc act_dict N/A Activity CreateAddFollowers contact_user_ids N/A new_follower_ids N/A set N/A N/A follower user_id N/A follower new_followers _GetInvalidate N/A N/A follower_id N/A N/A N/A N/A follower_id new_follower_ids N/A N/A N/A viewpoints N/A N/A N/A NotificationManager _CreateViewpointInvalidation viewpoint_id N/A N/A N/A viewpoints N/A N/A viewpoint_id get_followers viewpoint_id True N/A N/A N/A N/A N/A NotificationManager _NotifyFollowers client viewpoint_id N/A existing_followers new_followers _GetInvalidate activity_func N/A classmethod N/A gen coroutine NotifyCreateProspective N/A N/A cls client prospective_identity_keys timestamp N/A N/A N/A Sends notifications that the given identities have been linked to new prospective user
    accounts. Sends notifications to all users that have a contact with a matching identity.
     N/A N/A N/A N/A N/A NotificationManager _NotifyUsersWithContact client create prospective user identity_key timestamp N/A identity_key prospective_identity_keys N/A classmethod N/A gen coroutine NotifyFetchContacts N/A N/A cls client user_id timestamp reload_all N/A N/A N/A Adds a notification for the specified user that new contacts have been fetched and need
    to be pulled to the client. Invalidates all the newly fetched contacts, which all have
    sort_key greater than "timestamp".
     N/A invalidate N/A contacts N/A start_key N/A N/A Contact CreateSortKey None N/A reload_all 0 timestamp N/A reload_all N/A N/A N/A N/A invalidate N/A contacts N/A all True N/A N/A N/A N/A NotificationManager CreateForUser client user_id fetch_contacts invalidate invalidate N/A classmethod N/A gen coroutine NotifyHidePhotos N/A N/A cls client user_id ep_dicts N/A N/A N/A Adds a notification for the specified user that photos have been marked as hidden from
    his personal collection. Invalidates all episodes that contain the posts to be hidden. No
    activity is created, since other followers of the affected viewpoint(s) are not affected
    by this action.
     N/A invalidate N/A episodes N/A N/A episode_id get_photos N/A ep_dict N/A episode_id True N/A ep_dict ep_dicts N/A N/A N/A N/A NotificationManager CreateForUser client user_id hide_photos invalidate invalidate N/A classmethod N/A gen coroutine NotifyLinkIdentity N/A N/A cls client target_user_id identity_key timestamp N/A N/A N/A Notifies all users referencing any contact having the specified identity that the contact
    has been modified. Invalidates the contact metadata so that the user will re-load it.
    Notifies the new owner of the identity that he needs to refresh his identity list.
     N/A N/A N/A N/A NotificationManager _NotifyUsersWithContact client link identity identity_key timestamp N/A N/A N/A N/A NotificationManager _NotifyUserInvalidateSelf client link user target_user_id N/A classmethod N/A gen coroutine NotifyMergeIdentities N/A N/A cls client target_user_id identity_keys timestamp N/A N/A N/A Notifies all users referencing any contact having the specified identity that the contact
    has been modified. Invalidates the contact metadata so that the user will re-load it.
    Notifies all owners of the identities and invalidates their user id. Causes an identity list refresh.
     N/A N/A N/A N/A N/A NotificationManager _NotifyUsersWithContact client merge identities identity_key timestamp N/A identity_key identity_keys N/A N/A N/A N/A NotificationManager _NotifyUserInvalidateSelf client merge users target_user_id N/A classmethod N/A gen coroutine NotifyMergeViewpoint N/A N/A cls client viewpoint_id existing_followers target_follower source_user_id act_dict timestamp N/A N/A N/A Notifies the target user that he has been added to the specified viewpoint. Invalidates
    the entire viewpoint so that the target user will load it in its entirety. Also notifies
    all specified existing followers of the viewpoint that a new follower has been added.
    Creates a merge activity in the viewpoint.
     N/A activity_func N/A N/A NotificationManager _CreateActivityFunc act_dict N/A Activity CreateMergeAccounts N/A target_follower user_id source_user_id _GetInvalidate N/A N/A follower_id N/A N/A N/A N/A follower_id N/A target_follower user_id N/A N/A N/A viewpoints N/A N/A N/A NotificationManager _CreateViewpointInvalidation viewpoint_id N/A N/A N/A viewpoints N/A N/A viewpoint_id get_followers viewpoint_id True N/A N/A N/A N/A N/A NotificationManager _NotifyFollowers client viewpoint_id N/A existing_followers N/A target_follower _GetInvalidate activity_func N/A classmethod N/A gen coroutine NotifyPostComment N/A N/A cls client followers act_dict cm_dict N/A N/A N/A Notifies specified followers that a new comment has been posted to the viewpoint.
    Invalidates this comment and all comments posted in the future by setting the start_key.
    Doing this enables the client to efficiently "stack" comment invalidations by fetching
    all comments beyond the lowest start_key in a single call to query_viewpoints. Creates a
    post_comment activity in the viewpoint.
     viewfinder.backend.db.comment Comment N/A activity_func N/A N/A NotificationManager _CreateActivityFunc act_dict N/A Activity CreatePostComment cm_dict N/A N/A N/A len N/A cm_dict N/A message N/A NotificationManager MAX_INLINE_COMMENT_LEN N/A N/A start_key N/A N/A Comment ConstructCommentId N/A cm_dict N/A timestamp 0 0 N/A invalidate N/A viewpoints N/A N/A viewpoint_id get_comments comment_start_key N/A cm_dict N/A viewpoint_id True start_key N/A N/A invalidate None N/A N/A N/A N/A NotificationManager _NotifyFollowers client N/A cm_dict N/A viewpoint_id followers invalidate activity_func inc_badge True N/A classmethod N/A gen coroutine NotifyRecordSubscription N/A N/A cls client user_id N/A N/A N/A Notifies other devices of the user that a new subscriptrion has been recorded and needs
    to be fetched.
     N/A invalidate N/A users N/A user_id N/A N/A N/A N/A NotificationManager CreateForUser client user_id record_subscription invalidate invalidate N/A classmethod N/A gen coroutine NotifyRegisterUser N/A N/A cls client user_dict ident_dict timestamp is_first_register is_linking N/A N/A N/A Notifies friends and contact owners of the user when one (or several) of the following
    have occurred:

    1. One or more friend-visible user attributes have been updated (such as name).

    2. The user is registering for the first time (i.e. was a prospective user before). In this
       case, "is_first_register" is true.

    3. A new identity has been linked to the user. In this case, "is_linking" is true.

    The user himself is notified since a user always has a friend relationship with himself.
     viewfinder.backend.op.alert_manager AlertManager N/A N/A is_first_register is_linking N/A N/A name N/A is_first_register first register contact link contact N/A N/A N/A N/A NotificationManager _NotifyUsersWithContact client name N/A ident_dict N/A key timestamp N/A N/A any N/A N/A attr_name user_id N/A attr_name N/A N/A user_dict keys N/A N/A invalidate N/A users N/A N/A user_dict N/A user_id N/A N/A N/A N/A NotificationManager _NotifyFriends client register friend N/A user_dict N/A user_id invalidate N/A N/A N/A is_first_register is_linking N/A N/A N/A N/A N/A NotificationManager _NotifyUserInvalidateSelf client register friend self N/A user_dict N/A user_id N/A is_first_register N/A _VisitContactUserId N/A N/A contact_user_id N/A N/A N/A settings N/A N/A N/A gen Task N/A AccountSettings QueryByUser client contact_user_id None N/A N/A N/A N/A AlertManager SendRegisterAlert client N/A user_dict N/A user_id contact_user_id settings N/A N/A gen coroutine N/A N/A N/A N/A gen Task N/A Contact VisitContactUserIds client N/A ident_dict N/A key _VisitContactUserId N/A classmethod N/A gen coroutine NotifyRemoveContacts N/A N/A cls client user_id timestamp reload_all N/A N/A N/A Adds a notification for the specified user that contacts have been removed and need
    to be removed from the client. Invalidates all the newly removed contacts, which all have
    sort_key greater than or equal to "timestamp".
     N/A invalidate N/A contacts N/A start_key N/A N/A Contact CreateSortKey None N/A reload_all 0 timestamp N/A reload_all N/A N/A N/A N/A invalidate N/A contacts N/A all True N/A N/A N/A N/A NotificationManager CreateForUser client user_id remove_contacts invalidate invalidate N/A classmethod N/A gen coroutine NotifyRemoveFollowers N/A N/A cls client viewpoint_id existing_followers remove_ids act_dict N/A N/A N/A Notifies removed followers that they have been removed from the specified viewpoint.
    Invalidates the viewpoint attributes for those followers so that they will get the REMOVED
    label. Also notifies all existing followers of the viewpoint that they need to reload the
    list of viewpoint followers. Creates a remove_followers activity in the viewpoint.
     N/A activity_func N/A N/A NotificationManager _CreateActivityFunc act_dict N/A Activity CreateRemoveFollowers remove_ids N/A remove_id_set N/A set remove_ids _GetInvalidate N/A N/A follower_id N/A N/A N/A N/A follower_id remove_id_set N/A N/A N/A viewpoints N/A N/A viewpoint_id get_attributes viewpoint_id True N/A N/A N/A viewpoints N/A N/A viewpoint_id get_followers viewpoint_id True N/A N/A N/A N/A N/A NotificationManager _NotifyFollowers client viewpoint_id existing_followers _GetInvalidate activity_func always_notify True N/A classmethod N/A gen coroutine NotifyRemovePhotos N/A N/A cls client user_id ep_dicts N/A N/A N/A Adds a notification for the specified user that photos have been marked as removed from
    his personal collection. Invalidates all episodes that contain the posts to be removed. No
    activity is created, since other followers of the affected viewpoint(s) are not affected
    by this action.
     N/A invalidate N/A episodes N/A N/A episode_id get_photos N/A ep_dict N/A episode_id True N/A ep_dict ep_dicts N/A N/A N/A N/A NotificationManager CreateForUser client user_id remove_photos invalidate invalidate N/A classmethod N/A gen coroutine NotifyRemoveViewpoint N/A N/A cls client user_id viewpoint_id N/A N/A N/A Adds a notification for the specified user that a viewpoint have been marked
    as removed from their inbox.  Invalidates all viewpoints that were removed.  No
    activity is created since other followers of the affected viewpoint(s) are not
    affected by this action.
     N/A invalidate N/A viewpoints N/A N/A viewpoint_id get_attributes viewpoint_id True N/A N/A N/A N/A NotificationManager CreateForUser client user_id remove_viewpoint invalidate invalidate viewpoint_id viewpoint_id N/A classmethod N/A gen coroutine NotifyReviveFollowers N/A N/A cls client viewpoint_id revive_follower_ids timestamp N/A N/A N/A Adds a notification for each of the followers that have been revived. The notification
    invalidates the entire viewpoint in order to force the client to load it in its entirety.
     N/A N/A N/A len revive_follower_ids 0 N/A N/A invalidate N/A viewpoints N/A N/A N/A NotificationManager _CreateViewpointInvalidation viewpoint_id N/A N/A N/A N/A N/A NotificationManager CreateForUser client follower_id revive followers invalidate invalidate viewpoint_id viewpoint_id N/A follower_id revive_follower_ids N/A classmethod N/A gen coroutine NotifySavePhotos N/A N/A cls client viewpoint_id follower act_dict ep_dicts N/A N/A N/A Creates notification and activity that new episode(s) have been created in a user's
    default viewpoint and filled with saved photos from other viewpoint(s). Since only the
    owning user follows the default viewpoint, the _NotifyFollowers call will just end up
    creating a notification for a single user. The new episode(s) are invalidated so that
    other devices will load them. Creates a save_photos activity in the viewpoint.
     N/A activity_func N/A N/A NotificationManager _CreateActivityFunc act_dict N/A Activity CreateSavePhotos ep_dicts N/A invalidate N/A episodes N/A N/A N/A NotificationManager _CreateEpisodeInvalidation N/A ep_dict N/A new_episode_id N/A ep_dict ep_dicts N/A N/A N/A N/A NotificationManager _NotifyFollowers client viewpoint_id N/A follower invalidate activity_func N/A classmethod N/A gen coroutine NotifyShareExisting N/A N/A cls client viewpoint_id followers act_dict ep_dicts viewpoint_updated N/A N/A N/A Notifies the specified followers of an existing viewpoint that new photos have been
    shared with them. Invalidates all shared episodes. Creates a share activity in the viewpoint.
     N/A activity_func N/A N/A NotificationManager _CreateActivityFunc act_dict N/A Activity CreateShareExisting ep_dicts N/A invalidate N/A episodes N/A N/A N/A NotificationManager _CreateEpisodeInvalidation N/A ep_dict N/A new_episode_id N/A ep_dict ep_dicts N/A viewpoint_updated N/A N/A N/A invalidate N/A viewpoints N/A N/A viewpoint_id get_attributes viewpoint_id True N/A N/A N/A N/A NotificationManager _NotifyFollowers client viewpoint_id followers invalidate activity_func inc_badge True N/A classmethod N/A gen coroutine NotifyShareNew N/A N/A cls client vp_dict followers contact_user_ids act_dict ep_dicts timestamp N/A N/A N/A Notifies all followers of a new viewpoint that new photos have been shared with them.
    Invalidates the new viewpoint in its entirety. Notifies the owners of any contacts that
    have been newly registered. Creates a share activity in the viewpoint.
     N/A activity_func N/A N/A NotificationManager _CreateActivityFunc act_dict N/A Activity CreateShareNew ep_dicts contact_user_ids N/A invalidate N/A viewpoints N/A N/A N/A NotificationManager _CreateViewpointInvalidation N/A vp_dict N/A viewpoint_id N/A N/A N/A N/A NotificationManager _NotifyFollowers client N/A vp_dict N/A viewpoint_id followers invalidate activity_func inc_badge True N/A classmethod N/A gen coroutine NotifyTerminateAccount N/A N/A cls client user_id N/A N/A N/A Notifies all friends of the specified user, and all users with the terminated user as
    a contact that the account has been terminated.
     N/A invalidate N/A users N/A user_id N/A N/A N/A N/A NotificationManager _NotifyFriends client terminate_account user_id invalidate N/A classmethod N/A gen coroutine NotifyUnshare N/A N/A cls client viewpoint_id followers act_dict ep_dicts viewpoint_updated N/A N/A N/A Notifies all followers of a viewpoint that photos have been unshared from the viewpoint.
    Invalidates all episodes that contain any of the unshared photos. Creates an unshare
    activity in the viewpoint.
     N/A activity_func N/A N/A NotificationManager _CreateActivityFunc act_dict N/A Activity CreateUnshare ep_dicts N/A invalidate N/A episodes N/A N/A N/A NotificationManager _CreateEpisodeInvalidation N/A ep_dict N/A episode_id N/A ep_dict ep_dicts N/A viewpoint_updated N/A N/A N/A invalidate N/A viewpoints N/A N/A viewpoint_id get_attributes viewpoint_id True N/A N/A N/A N/A NotificationManager _NotifyFollowers client viewpoint_id followers invalidate activity_func inc_badge True N/A classmethod N/A gen coroutine NotifyUpdateEpisode N/A N/A cls client viewpoint_id followers act_dict ep_dict N/A N/A N/A Notifies all followers of the specified viewpoint that an episode within the viewpoint
    has been updated. Invalidates the metadata on the episode (but not the photos). Creates an
    update_episode activity in the viewpoint.
     N/A activity_func N/A N/A NotificationManager _CreateActivityFunc act_dict N/A Activity CreateUpdateEpisode ep_dict N/A invalidate N/A episodes N/A N/A episode_id get_attributes N/A ep_dict N/A episode_id True N/A N/A N/A N/A NotificationManager _NotifyFollowers client viewpoint_id followers invalidate activity_func N/A classmethod N/A gen coroutine NotifyUpdateFriend N/A N/A cls client friend_dict N/A N/A N/A Adds a notification for the current user that friend metadata has changed. Since this
    only affects the current user, send invalidations to the current user's devices only.
     N/A invalidate N/A users N/A N/A friend_dict N/A user_id N/A N/A N/A N/A NotificationManager CreateForUser client N/A N/A N/A NotificationManager _GetOperation user_id update_friend invalidate invalidate N/A classmethod N/A gen coroutine NotifyUpdateFollower N/A N/A cls client foll_dict N/A N/A N/A Adds a notification for the current user that follower metadata has changed. Since this
    only affects that user, invalidates the viewpoint metadata only for that user. No activity
    is created, since other followers of the viewpoint are not affected by this action.
     N/A viewpoint_id N/A foll_dict N/A viewpoint_id N/A seq_num_pair None N/A invalidate N/A viewpoints N/A N/A viewpoint_id get_attributes viewpoint_id True N/A N/A viewed_seq foll_dict N/A N/A seq_num_pair N/A None N/A foll_dict N/A viewed_seq N/A N/A N/A len foll_dict 2 N/A N/A invalidate None N/A N/A N/A N/A NotificationManager CreateForUser client N/A N/A N/A NotificationManager _GetOperation user_id update_follower invalidate invalidate viewpoint_id viewpoint_id seq_num_pair seq_num_pair N/A classmethod N/A gen coroutine NotifyUpdateUser N/A N/A cls client user_dict settings_dict timestamp N/A N/A N/A Notifies all friends of the specified user that one or more friend-visible attributes
    have been updated (such as name). If only private settings have been updated, only notify
    the user's other devices of the changes.
     N/A user_id N/A user_dict N/A user_id N/A N/A any N/A N/A attr_name N/A user_id pwd_hash salt N/A attr_name N/A N/A user_dict keys N/A N/A invalidate N/A users N/A user_id N/A N/A N/A N/A NotificationManager _NotifyFriends client update_user N/A user_dict N/A user_id invalidate N/A N/A invalidate N/A users N/A N/A user_dict N/A user_id N/A N/A N/A N/A NotificationManager CreateForUser client user_id update_user invalidate invalidate N/A classmethod N/A gen coroutine NotifyUpdateViewpoint N/A N/A cls client vp_dict followers prev_values act_dict N/A N/A N/A Notifies all followers of the specified viewpoint that the viewpoint's metadata has
    been updated. "prev_values" contains the old values of title and/or cover photo, if they
    were updated. Invalidates the metadata on the viewpoint.
     N/A activity_func N/A N/A NotificationManager _CreateActivityFunc act_dict N/A Activity CreateUpdateViewpoint prev_values N/A invalidate N/A viewpoints N/A N/A viewpoint_id get_attributes N/A vp_dict N/A viewpoint_id True N/A N/A N/A N/A NotificationManager _NotifyFollowers client N/A vp_dict N/A viewpoint_id followers invalidate activity_func N/A classmethod N/A gen coroutine NotifyUnlinkIdentity N/A N/A cls client user_id identity_key timestamp N/A N/A N/A Notifies all users referencing a contact having the specified identity that the contact
    has been modified. Invalidates the contact metadata so that the user will re-load it.
    Also invalidates the user itself, which causes a refresh of the identity list.
     N/A N/A N/A N/A NotificationManager _NotifyUsersWithContact client unlink_identity identity_key timestamp N/A N/A N/A N/A NotificationManager _NotifyUserInvalidateSelf client unlink_self user_id N/A classmethod N/A gen coroutine NotifyUploadContacts N/A N/A cls client user_id timestamp N/A N/A N/A Adds a notification for the specified user that new contacts have been uploaded/updated and need
    to be pulled to the client. Invalidates all the newly uploaded/updated contacts, which all have
    sort_key greater than or equal to "timestamp".
     N/A invalidate N/A contacts N/A start_key N/A N/A Contact CreateSortKey None timestamp N/A N/A N/A N/A NotificationManager CreateForUser client user_id upload_contacts invalidate invalidate N/A classmethod N/A gen coroutine NotifyUploadEpisode N/A N/A cls client viewpoint_id follower act_dict ep_dict ph_dicts N/A N/A N/A Creates notification and activity that a new episode in a user's default viewpoint has
    been created and filled with uploaded photos. Since only the owning user follows the default
    viewpoint, the _NotifyFollowers call will just end up creating a notification for a single
    user. The new episode is invalidated so that other devices will load it. Creates an
    upload_episode activity in the viewpoint.
     N/A activity_func N/A N/A NotificationManager _CreateActivityFunc act_dict N/A Activity CreateUploadEpisode ep_dict ph_dicts N/A invalidate N/A episodes N/A N/A N/A NotificationManager _CreateEpisodeInvalidation N/A ep_dict N/A episode_id N/A N/A N/A N/A NotificationManager _NotifyFollowers client viewpoint_id N/A follower invalidate activity_func N/A classmethod N/A gen coroutine _GetOperation N/A N/A cls N/A N/A N/A Gets the current operation, which must be in-scope. N/A operation N/A N/A Operation GetCurrent N/A N/A N/A operation operation_id None there must be current operation in order to create notification N/A operation N/A classmethod _CreateActivityFunc N/A N/A cls act_dict create_func N/A args N/A N/A Returns a coroutine with following signature:

      activity_func(client, user_id, viewpoint_id, update_seq)

    When this function is invoked, it executes "create_func", which is one of the constructor
    methods on the Activity class. It invokes the callback with the resulting activity.
     _CreateActivity N/A N/A client user_id viewpoint_id update_seq N/A N/A N/A activity N/A N/A create_func client user_id viewpoint_id N/A act_dict N/A activity_id N/A act_dict N/A timestamp update_seq args N/A N/A N/A gen Return activity N/A N/A gen coroutine N/A _CreateActivity N/A classmethod _CreateViewpointInvalidation N/A N/A cls viewpoint_id N/A N/A N/A Create invalidation for entire viewpoint, including all metadata and all collections.

    NOTE: Make sure to update this when new viewpoint collections are added.
     N/A N/A viewpoint_id get_attributes get_followers get_activities get_episodes get_comments viewpoint_id True True True True True N/A classmethod _CreateEpisodeInvalidation N/A N/A cls episode_id N/A N/A N/A Create invalidation for entire episode, including all metadata and all collections.

    NOTE: Make sure to update this when new episode collections are added.
     N/A N/A episode_id get_attributes get_photos episode_id True True N/A classmethod _NotifyUsersWithContact N/A N/A cls client name identity_key timestamp N/A N/A N/A Adds a notification to all users having contacts with the specified identity. Invalidates
    all contacts added after the specified timestamp.
     _VisitContactUserId N/A N/A contact_user_id N/A N/A N/A N/A N/A N/A NotificationManager CreateForUser client contact_user_id name invalidate invalidate N/A N/A gen coroutine N/A invalidate N/A contacts N/A start_key N/A N/A Contact CreateSortKey None timestamp N/A N/A N/A N/A gen Task N/A Contact VisitContactUserIds client identity_key _VisitContactUserId N/A classmethod N/A gen coroutine _NotifyUserInvalidateSelf N/A N/A cls client name user_id N/A N/A N/A Adds a notification for the user with 'user_id'. Invalidates this user to trigger a refresh of
    user information (eg: list of identities).
     N/A N/A N/A N/A NotificationManager CreateForUser client user_id name invalidate N/A users N/A user_id N/A classmethod N/A gen coroutine _NotifyFriends N/A N/A cls client name user_id invalidate N/A N/A N/A Adds a notification to all friends of the specified user that one or more friend-visible
    attributes have been updated. Always send the notification to every friend, even if that
    "friend" has blocked the user in question. Also send a notification to the user's other
    devices.
     viewfinder.backend.db.friend Friend _VisitFriend N/A N/A friend N/A N/A N/A N/A N/A N/A NotificationManager CreateForUser client N/A friend friend_id name invalidate invalidate N/A N/A gen coroutine N/A N/A N/A N/A gen Task N/A Friend VisitRange client user_id None None _VisitFriend N/A classmethod N/A gen coroutine _NotifyFollowers N/A N/A cls client viewpoint_id followers invalidate activity_func inc_badge always_notify N/A False False N/A N/A Adds a notification for each of the given followers that the specified viewpoint has
    structurally changed. If "invalidate" is a dict, then uses that directly. Otherwise, assumes
    it's a function that takes a follower id and returns the invalidate dict for that follower.
    If "always_notify" is true, then always send notifications, even to removed followers.

    In order to minimize undesirable client artifacts caused by reads of half-committed data,
    we will commit updates in this order:

    1. In parallel:
       a. Create the activity.
       b. Update all Followed records (of all followers in the viewpoint).

    2. In parallel:
       a. Update update_seq in the viewpoint.
       b. Update viewed_seq in the sending follower.

    3. In parallel:
       a. For each follower:
          i. Create notification
          ii. Send alert
     viewfinder.backend.db.viewpoint Viewpoint viewfinder.backend.op.alert_manager AlertManager N/A operation N/A N/A NotificationManager _GetOperation _NotifyOneFollower N/A N/A viewpoint seq_num_pair activity follower follower_settings N/A N/A N/A Creates a notification for the follower and sends an alert if configured to do so. N/A N/A N/A N/A follower IsRemoved N/A always_notify N/A N/A N/A N/A N/A invalidate None N/A isinstance invalidate dict N/A N/A foll_invalidate invalidate N/A N/A foll_invalidate N/A invalidate N/A follower user_id N/A is_sending_user N/A N/A follower user_id N/A operation user_id N/A notification N/A N/A N/A Notification CreateForUser client operation N/A follower user_id N/A activity name invalidate foll_invalidate activity_id N/A activity activity_id viewpoint_id viewpoint_id seq_num_pair seq_num_pair inc_badge N/A inc_badge N/A is_sending_user N/A N/A is_sending_user N/A N/A N/A N/A N/A AlertManager SendFollowerAlert client N/A follower user_id N/A notification badge viewpoint follower follower_settings activity N/A N/A gen coroutine N/A N/A N/A Viewpoint AssertViewpointLockAcquired viewpoint_id N/A viewpoint N/A N/A N/A gen Task N/A Viewpoint Query client viewpoint_id None N/A sending_follower N/A next N/A follower N/A follower followers N/A N/A follower user_id N/A operation user_id None N/A N/A viewpoint update_seq 1 N/A N/A sending_follower None N/A N/A N/A sending_follower viewed_seq 1 N/A seq_num_pair N/A N/A viewpoint update_seq N/A sending_follower viewed_seq N/A N/A seq_num_pair N/A N/A viewpoint update_seq None N/A activity_task N/A activity_func client N/A operation user_id viewpoint_id N/A viewpoint update_seq N/A follower_keys N/A N/A N/A AccountSettings ConstructKey N/A follower user_id N/A follower followers N/A settings_task N/A N/A gen Task N/A AccountSettings BatchQuery client follower_keys None must_exist False N/A followed_task N/A N/A gen Multi N/A N/A N/A gen Task N/A Followed UpdateDateUpdated client N/A follower user_id viewpoint_id N/A viewpoint last_updated N/A operation timestamp N/A follower followers N/A N/A activity all_follower_settings _ N/A N/A activity_task settings_task followed_task N/A N/A N/A operation timestamp N/A viewpoint last_updated N/A N/A N/A viewpoint last_updated N/A operation timestamp N/A N/A N/A N/A N/A gen Task N/A viewpoint Update client N/A N/A sending_follower None N/A N/A gen Task N/A sending_follower Update client N/A N/A util GenConstant None N/A N/A N/A N/A _NotifyOneFollower viewpoint seq_num_pair activity follower follower_settings N/A N/A follower follower_settings N/A zip followers all_follower_settings N/A classmethod N/A gen coroutine CreateForUser N/A N/A cls client user_id name invalidate activity_id viewpoint_id seq_num_pair inc_badge consistent_read N/A None None None None False False N/A N/A Calls Notification.CreateForUser with the current operation. N/A operation N/A N/A NotificationManager _GetOperation N/A notification N/A N/A N/A Notification CreateForUser client operation user_id name invalidate activity_id viewpoint_id seq_num_pair inc_badge consistent_read N/A N/A N/A gen Return notification N/A classmethod N/A gen coroutine N/A