Skip to content

Commit

Permalink
Add documentation on scheduled notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
hugobessa committed Dec 20, 2024
1 parent e312d58 commit 6fc2241
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ notifications_service.create_notification(
)
```

### Scheduled notifications

VintaSend schedules notifications by creating them on the database for sending when the `send_after` value has passed. The sending isn't done automatically but we have a service method called `send_pending_notifications` to send all pending notifications found in the database.

You need to call the `send_pending_notifications` service method in a cron job or a tool like Celery Beat.


## Glossary

* **Notification Backend**: It is a class that implements the methods necessary for VintaSend services to create, update, and retrieve Notifications from da database.
Expand Down

0 comments on commit 6fc2241

Please sign in to comment.