Skip to content

A server to make HTTP requests at a particular time with a database-backed work queue

License

Notifications You must be signed in to change notification settings

Vibhu-Agarwal/notification-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

notification-server

A server to make HTTP requests at a particular time with a database-backed work queue

Fork and Clone

git clone https://github.com/<your-GitHub-Username>/notification-server.git

Install Dependencies

pip install -r requirements.txt

Configure Environment Variables

export NOTIFICATIONS_SUPERUSER_PASSWORD="ADMIN_PANEL_PASSWORD"

Configure Settings

(src/notification_server/settings.py)

Set DELETE_PAST_NOTIFICATIONS to False if you want to keep the past notifications' data in the DB

DELETE_PAST_NOTIFICATIONS = True

Create Admin User

cd src/
python manage.py db_setup

Username: superuser

Usage

Run these two processes: Django-Server and process_tasks management command

Running Locally

Django Server

python manage.py runserver

process_tasks Management Command

python manage.py process_tasks

Endpoints

User & Authentication (notifications/)

Method Endpoint Function
POST place/ Place a new Notification
DELETE remove/<notification_id> Delete Notification with specified ID

notifications/place/

{
  "url": STRING,
  "method": ["post"|"delete"|"patch"|"get"],
  "time": STRING,
  "data": JSON
}

time: (Date and Time in proper format)

About

A server to make HTTP requests at a particular time with a database-backed work queue

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published