Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/SudipBishwakarma/Bulk-Remove-OneSignal-Users

Bulk remove OneSignal subscribed users blazingly faster with parallel processing.
https://github.com/SudipBishwakarma/Bulk-Remove-OneSignal-Users

numpy pandas python python-logger python-multiprocessing python-threading python3

Last synced: 12 days ago
JSON representation

Bulk remove OneSignal subscribed users blazingly faster with parallel processing.

Awesome Lists containing this project

README

        

# Bulk Remove OneSignal Users
Bulk remove OneSignal subscribed users blazingly faster with parallel processing.

## Description
This script makes use of pythons multiprocessing module for spawning N-number of child processes in parallel to execute auto-generated csv files.
Pythons threading module is used to fetch processed rows from queue and pass it to the logger.

Pandas is used for csv manipulation and Numpy for handy vectorization without explicit for loops.

## Usage
'file.py' is the main file to execute and depends on 'settings.py' file for api credentials and file to import.

File 'settings_sample.py' is identical to 'settings.py'.

Set CHUNK_SIZE to your desired figure. For instance, if the import file has 18K rows, then CHUNK_SIZE of 500 will create:
```
18000 / 500 = 36
36 files with 500 rows each and start 36 child processes to process generated files in parallel.
```

If the CHUNK_SIZE is lower, more files will get generated as well as the number of processes.
One downside to this is, your computer might become slower due to processes consuming the CPU.

Adjust CHUNK_SIZE based on optimal value and make sure you're not running any cpu intensive tasks before executing this script.

```
$ python3 file.py
```

Pull requests and feature improvements are most welcome.