diff --git a/pa_job_engine.py b/pa_job_engine.py new file mode 100644 index 0000000..110bc67 --- /dev/null +++ b/pa_job_engine.py @@ -0,0 +1,19 @@ +### +# +# This file controls the 'external' job control engine, that (periodically # +# looks / somehow is pushed an event?) picks up new jobs, and processes them. +# +# It then stores the progress/status, etc. in job and joblog tables as needed +# via wrapper functions. +# +# The whole pa_job_engine is multi-threaded, and uses the database tables for +# state management and communication back to the pa web site +# +### + +class PA_JobEngine(db.Model): + __tablename__ = "pa_job_engine" + id = db.Column(db.Integer, db.Sequence('pa_job_engine_id_seq'), primary_key=True) + state db.Column(db.String) + num_jobs_active = db.Column(db.Integer) + num_jobs_complete = db.Column(db.Integer)