Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


BASEURL/progress/update - eg,,

Parameters are:

  • jobid: The job ID passed in when this worker was created.
  • workid: Arbitrary string, integer or float defining one particular worker process - eg 'worker7', 'node32', 'flagger', etc. Must be unique within this individual job. Displayed as the plot's Y tick labels, so keep it short.
  • current: Integer or float representing the progress of this worker so far.
  • total: The 'end point' when this worker will have finished. The plot simply shows current/total as a percentage. 
  • ok: If this parameter is supplied, and equal to zero, then the bar plot for this worker is shown in red, to indicate a problem. The worker could send this status if it exits without finishing cleanly.
  • desc: Arbitrary status string to display in the plot, inside or next to the bar for this worker. Keep it short, or the plot will look ugly.


Calling these services in your code

In a shell script, it's probably easiest to use 'curl' to call the URL - for example:

$ JOBID=${LOGNAME}:`date -Ins`

$ curl "${JOBID}&desc=My+Job"

$ echo "View progress of this job at${JOBID}"

That sets the JOBID variable to something unique (login name, followed by an ISO timestamp), displays the viewing URL to the user, and calls the create service. You would then pass the JOBID variable to the worker processes.

Note that if you have an spaces in your description, you need to turn them into '+' characters in the URL passed to curl, or use the --data-urlencode option in the curl command, eg:

$ curl -G --data-urlencode jobid="${JOBID}" --data-urlencode desc="This is my job"

If you're calling these services from Python, the easiest way is to use the requests library - for example:

>>> import requests

>>> requests.get('', params={'jobid':sys.argv[1], 'workid':'flagger1', 'current':7, 'total':50, 'desc':'lots of RFI')