This project consists in storing jobs in a database and execute them through time.
-
Python 2.7
-
Conda
-
SQLite
-
git
git clone [email protected]:giovannirescia/workload-manager.git
conda create --name workload python=2.7 ipykernel
pip install -r requirements.txt
Run the next commands from inside the project's dir, i.e., workload-manager.
-
Instantiate settings.py.template if you want to customize some paths, otherwise just run
cp settings.py.template settings.py
-
Create a directory for the database
mkdir data
-
Run
python scripts/populate.py
to add some Jobs to be executed (these are just test examples) -
Set the PYTHONPATH so it can find the project's modules:
set PYTHONPATH=$PYTHONPATH:<path_to_the_project>
, eg, if your project is located in/Users/sarunas/my_projects/workload-manager
then the PYTHONPATH setting will beset PYTHONPATH=$PYTHONPATH:/Users/sarunas/my_projects/workload-manager
Note: the step 4 nees to be done each time a bash or shell terminal is opened. To avoid this step every time, just add the line set PYTHONPATH=$PYTHONPATH:<path_to_the_project>
, instantiated with a concrete path to the project of course, to the end of your ~/.bashrc or ~/.bash_profile file, then do source ~/.bashrc
(or source ~/.bash_profile
) and that's all.
Just run python scripts/worker.py
to select a queued job from the database and execute it.