Script Queue Manager
A small suite of simple CLI tools to queue up scripts to be executed. A simple use case is that of having to repeatedly execute the same scripts with different parameters and each script takes hours to execute. (eg - I personally use it to queue my deep learning training tasks)
Installing from pip
Stable release
pip install script-queue-manager
Development release
pip install -i https://test.pypi.org/simple/ script-queue-manager
Getting Started
I highly recommend that you fork the project by clicking on the Fork button and then cloning your fork using the command mentioned below.
git clone <your fork URL>
Prerequisites
- Python 3.5+
- A code editor or IDE(preferable PyCharm)
Setting up for Development
Follow the steps mentioned below to get your dev instance running.
-
After cloning your fork, open the project in an IDE or code editor of you choice.
-
It is highly advisable that you create a new Python environment for the project. Follow the instructions given here.
-
Navigate to the project directory and install the
requirement.txtpackages.cd <project-directory> pip install -r requirements.txt -
Build the project:
python setup.py install -
Use the
pusherto push a script to the task queue.sqm-pusher -s "cat x.txt" -
Start the
executortool.sqm-executorIf you want to start it as a background process, in Ubuntu run
sqm-executor &
Execution Model
The executor fetches an object from the front of the queue and prepares a script as PRE_SCRIPT + QUEUE_SCRIPT. Here, PRE_SCRIPT can be given as input to the executor using the flag -p as shown below:
sqm-executor -p "path-to-the-file-containing-the-prescripts"
The sleeping interval for the executor to sleep in between tasks can be provided using the flag -s. By default it is 15s.
The executor produces logs for every task it executes. The file path for this log file can be provided using the -l flag. By default it is located at $HOME/sqm/logs.txt.
Tests
Not yet implemented
Built With
- Persistqueue - File based queue.
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Authors
- Mayank Vaidya - Initial work
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Metadata
Release files for script-queue-manager 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| script_queue_manager-0.0.4.tar.gz | 4.2 kB | Without provenance | Details for script_queue_manager-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| script_queue_manager-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for script_queue_manager-0.0.4-py3-none-any.whl |
Total release size: 10.0 kB
Release files / script_queue_manager-0.0.4.tar.gz
| Download URL | script_queue_manager-0.0.4.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3c745ed540f54956779f8bfdb6b6c3e5896676ab5638f63daab1bb1e8e1fc94
|
|
BLAKE2b-256 checksum How to use checksums |
5860992e87ee3acfeb06f7f336193526f5ad6bfcc14aceae0efc38105b846ad0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.6
|
Release files / script_queue_manager-0.0.4-py3-none-any.whl
| Download URL | script_queue_manager-0.0.4-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f516d28bf7772a9f6a7791f4b7181344d71560a2f72ba5a1a77719461431537b
|
|
BLAKE2b-256 checksum How to use checksums |
25749992fff7681b2460e8d99f9154232fb3ca08a8518939b0fcbdfec2b6cd90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.6
|
Security for script-queue-manager 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.