Skip to content

Latest commit

 

History

History
66 lines (44 loc) · 1.67 KB

README.md

File metadata and controls

66 lines (44 loc) · 1.67 KB

User Cleaner

demonstration

Table of Contents

About

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.

Requirements

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.

How to use

Setup

# 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

demonstration

Technologies

  • Python
  • MongoDB
  • apscheduler