Project-Stage-Academy / UA_1155_alpha

UA-1155.Python Project Stage alpha group
3 stars 0 forks source link

46 investor notification system development optional #95

Closed AlexanderSychev2005 closed 1 month ago

AlexanderSychev2005 commented 2 months ago

1) Added notification system (model for notifications, celery task for creating notifications objects in mongodb and email an investor about project updating). 2) implemented and configured Celery and Redis.

To use Redis, download it from: https://github.com/tporadowski/redis/releases Run it with ...Program Files/Redis/redis-cli.exe

Instructions on how to use celery and redis:

  1. First, you should run our server: python manage.py runserver
  2. Then, run celery worker, who takes tasks and runs them and save data in Redis: celery -A forum worker -l info -P gevent

Endpoints: ..api/notifications/new/ - Only new unread messages, sorted by date ..api/notifications/all - All notifications for user, sorted by date

image image image image