Versions Compared


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


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')