It is a simple cron built for Pega a Visão project. The objective of this is to check the validation time of the users and delete the users that have more than 7 days with the invalid status.
To run this repository by yourself you will need to install python, and them install all the project requirements. We will show how to do it in the next step.
# Clone the cron repository
$ git clone <https://github.com/CorchoForce/user-cleaner>
# Access the frontend directory
$ cd user-cleaner/
# Install all the pip requirements
$ pip install -r requirements.txt
# Create a .env archive
$ touch .env
# Access the .env with the following parameters
MONGO_USERNAME= #Mongo username
MONGO_PASSWORD= #Mongo password
MONGO_DATABASE= #Mongo database name
MONGO_COLLECTION= #Mongo collection
MONGO_PORT= #Mongo port
SCHEDULE_TIME_HOUR= #Time that the scheduler will run
MONGO_HOSTNAME= #Mongo hostname
# Access the src directory
$ cd src/
# Run scheduler.py archive
$ python scheduler.py
- Python
- MongoDB
- apscheduler