Django Timed Dismissal Notice

I created an iPhone app that I want to receive notifications at certain times. The Django backend application has an event queue with dates when the event reminder should be transferred to the iPhone client. This is similar to Watch Alert from eBay; when the bidding period of the observed item is close to completion, eBay sends you a message reminding you.

What is the best way to implement this on a server using Django? I hesitate to use cron, because there will be a large number of events, and I do not want to plan cron for each event. In addition, I want the model of the event notification system (I used the adapter with pleasure) to use the event queue, so if the event is deleted or updated, the event notification system will not use outdated model data.

+3
source share
2 answers

cron is the right tool for this, but you do not need a separate cron entry for each event. Instead, cron should run a Django script, which checks the database for any notifications and runs them.

+5

, . Python, crontab.

+3

Source: https://habr.com/ru/post/1775648/


All Articles