Fundraising tech/Process-control

Process-control is a small python package used by fundraising tech to schedule jobs, log output, enforce that they're being run under the correct user, and ensure that any job parameter changes are logged.

To change or add a job, log on to the fundraising cluster's puppetmaster and check out a copy of the localsettings repo in your local home directory (those files should not leave the cluster). In the localsettings repo, cd to process-control/<machine name>.

Each yaml file in that directory represents a job that can be run on the specified machine. They will all run under the credentials of the job runner user (configured in /etc/process-control.yaml).

Make your edits to yaml files, commit the changes, and push the changes to the repo. Then run

fundraising_code_update -p process-control


rsync_blaster ALL:process-control

Answer 'y' when rsync_blaster asks whether to restart services. This will actually just regenerate crontab files based on 'schedule' properties in the job configuration files. If a job has no 'schedule' property or the 'schedule' property is commented out, the job will only run when invoked by a user or another job.