return exitcode, out, err
def processJob(conn, jobid):
- print("Process job %d" % (jobid))
c = conn.cursor()
c.execute("SELECT cmd FROM jobs WHERE id=?", (jobid,))
cmd, = c.fetchone()
+ print("Process job %d: %s" % (jobid, cmd))
+
ec, out, err = runCmd(cmd)
c.execute("UPDATE jobs SET exitcode=?, done=1 WHERE id=?;", (ec, jobid))
COMMANDS:
-c cmdfn add jobs from the file with list of commands
-h print this text
- -s print status information
- -w work on the database
+ -s print progress information
+ -w do work and process jobs
OPTIONS:
-d database the database to process
- -n num in -w mode, only perform num-many jobs
+ -n num in -w mode, only process num-many jobs
-p cols-def create properties table with SQL column spec
- -v print output of the job's command
+ -v verbose output
Commands may be combined in one call of {0}.