Now I have successfully set up Django celery to check my existing tasks, to remind the user via email when the task is completed:
@periodic_task(run_every=datetime.timedelta(minutes=1)) def check_for_tasks(): tasks = mdls.Task.objects.all() now = datetime.datetime.utcnow().replace(tzinfo=utc,second=00, microsecond=00) for task in tasks: if task.reminder_date_time == now: sendmail(...)
So far, so good, however, what if I wanted to also display the popup for the user as a reminder?
Twitter bootstrap allows you to create popups and display them from javascript:
$(this).modal('show');
The problem is, how can the celery worker daemon run this javascript in the user's browser? Maybe I'm wrong, and this is impossible. So the question remains, can a cronjob on celery ever be used to receive ui notifications in a browser?
source share