projects
/
paralleljobs.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
some usage text improvements
[paralleljobs.git]
/
paralleljobs.py
diff --git
a/paralleljobs.py
b/paralleljobs.py
index baf79651b101056abf7eb20513c73303e8cbf695..6a1da0df60929f5aa29367fc1f5c06c1a0bc9b45 100755
(executable)
--- a/
paralleljobs.py
+++ b/
paralleljobs.py
@@
-66,12
+66,13
@@
def runCmd(cmd):
return exitcode, out, err
def processJob(conn, jobid):
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()
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))
ec, out, err = runCmd(cmd)
c.execute("UPDATE jobs SET exitcode=?, done=1 WHERE id=?;", (ec, jobid))
@@
-161,14
+162,14
@@
Usage:
COMMANDS:
-c cmdfn add jobs from the file with list of commands
-h print this text
COMMANDS:
-c cmdfn add jobs from the file with list of commands
-h print this text
- -s print
statu
s information
- -w
work on the database
+ -s print
progres
s information
+ -w
do work and process jobs
OPTIONS:
-d database the database to process
OPTIONS:
-d database the database to process
- -n num in -w mode, only p
erform
num-many jobs
+ -n num in -w mode, only p
rocess
num-many jobs
-p cols-def create properties table with SQL column spec
-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}.
Commands may be combined in one call of {0}.