Awight has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/343124 )
Change subject: More docs
......................................................................
More docs
Change-Id: Id210abfa259c8f3bc2c9e62ba8fc2907554fc70a
---
M README.md
1 file changed, 29 insertions(+), 6 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/process-control
refs/changes/24/343124/1
diff --git a/README.md b/README.md
index 8bce9c0..c5300d6 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,12 @@
Job wrapper which does a bit of bookkeeping for a subprocess.
* Prevents simultaneous runners by saving a lock file per job.
-* Configurable by commandline or config file parameters.
-* Captures stdout and stderr, and can do TBD things with the output.
-* Can prevent future job runs when unrecoverable failure conditions are
detected.
+* Configurable by config file parameters.
+* Captures stdout and stderr. We can redirect stdout to a
+file. Any stderr is interpreted as a job failure.
+
+Running and configuration
+=======
To run a job, point at its description file:
crash-override job-desc.yaml
@@ -15,13 +18,33 @@
command: /usr/local/bin/timecard --start 9:00 --end 5:30
-# Optional timeout in seconds, after which your job will be aborted. Defaults
to 10 minutes, JobWrapper.DEFAULT_TIMEOUT
+# Optional timeout in seconds, after which your job will be
+# aborted. Defaults to 10 minutes, JobWrapper.DEFAULT_TIMEOUT
timeout: 30
-# Optional filename for the job output. All output will be concatenated into
this file, with a header for each job.
+# Optional filename for the job output. All output will be
+# concatenated into this file, with a header for each job.
stdout_destination: "/tmp/jobnuts.log"
```
-TODO:
+Failure detection
+======
+
+The following conditions will be interpreted as a job failure, after
+which we report the problem to stderr and exit with a non-zero return
+code.
+
+* Any output on stderr. This output is relayed back to the calling
+process stderr, so may be included in failure email at the moment.
+* Non-zero subprocess exit code.
+* Timeout.
+
+
+TODO
+====
+
* Syslog actions, at least when tweezing new crontabs.
* Log invocations.
+* Prevent future job runs when unrecoverable failure conditions are detected.
+* Should we support commandline flags?
+* Fine-tuning of failure detection.
--
To view, visit https://gerrit.wikimedia.org/r/343124
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id210abfa259c8f3bc2c9e62ba8fc2907554fc70a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits