Name: databuilder_automate
Owner: Clinical Informatics Research Division
Description: Scripts to automate data builder / data finisher
Created: 2015-09-12 01:24:12.0
Updated: 2016-07-19 16:39:33.0
Pushed: 2015-12-21 22:58:50.0
Homepage: null
Size: 10
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
See “Deployment” section below.
These are intended to be run from cron, but can also be kicked-off manually (see usage below).
run_concurrent.py - Runs all pending db/df jobs concurrently, Oracle only
run_sequential.py - Runs all pending db/df job sequentially, use on Postgres i2b2 virtual machines
Set the following fields:
logfile - should match run_job.py
pidfile - lock file to prevent concurrent wrapper runs
filedir - data builder job queue dir (cleared by running these wrapper script)
prepdir - working dir where jobs are moved for processing
$ python run_concurrent.py
$ python run_sequential.py
As user who will run the scripts; typically this is written to /var/spool/cron/username.
$ crontab -e
*/5 * * * * python /path/to/run_[concurrent|sequential].py
run_job.py - Runs db/df for a specific job (json)
Set the following fields:
logfile - should match run_concurrent/sqeuential.py
finish - path to data finisher program
dbdir - where output files get created (will contain subdirs for each i2b2 user)
sender - notification email address of sender
recipients - notification email addresses recipients (comma separated list)
NOTE: must also set recipeint in dfbuilder.py (TODO: moved to data builder config file)
$ python run_job.py /path/to/job_file.json
run_job.mk - Make file to run data builder
config - /path/to/data_builder.conf
TOP - /path/to/heron_extract (data builder source code)
See logfile
Email from data builder success/fail. Email from finisher fail.