Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • N notifications-routing
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 10
    • Issues 10
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Notifications project
  • notifications-routing
  • Issues
  • #31
Closed
Open
Issue created Dec 14, 2020 by Carina Antunes@crdeolivOwner

[DAILY AGS] Implement daily job

# pseudo-code


Fetch distinct users from user_daily_notifications(date): user_id[]
For every user_id in user_ids:
    var notifications[]

    Fetch user_daily_notifications(user_id, date): {user_id, date, notification_id}[]
    For each notification in user_daily_notifications:
        Fetch notification(id)
        # Future: Check is not processed yet
        Append to notifications
    
    Send to queue {user_id, notifications}

    For each notification in user_daily_notifications:
        Delete entry from DB after processing
    
# Only delete after sending to avoid deleting before sending to queue
# Error handling, to avoid duplicates: when we have a db to track notification status, we should verify notification is not processed before before appending to notifications

More info: https://codimd.web.cern.ch/LtipSj4_RDmBvz3hWJed2Q?view#Option-2

Edited Dec 16, 2020 by Carina Antunes
Assignee
Assign to
Time tracking