Skip to content

A simple python scheduler used to remove a user after a certain amount of time if it's not a valid user.

License

Notifications You must be signed in to change notification settings

CorchoForce/user-cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A simple python scheduler used to remove a user after a certain amount of time if it's not a valid user.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages