[Iplant-api-dev] Wildcard Events for Job Status Notifications
Rion Dooley
dooley at tacc.utexas.edu
Wed Aug 13 16:20:59 MST 2014
You’re on the right track. Notifications expire after they fire unless you explicitly ask for them to stay active. You do that by setting persistent to true in your notification object. This should work regardless of whether you are embedding the notification is a job or transfer request, or calling the Notifications service directly.
{
"url":"https://de-2.iplantc.org/de/agave-cb/077ec168-93fb-4a1b-aede-ca5e597cde75?status=${JOB_STATUS}&external-id=${JOB_ID}&end-time=${JOB_END_TIME}",
"event":"*",
"persistent":true
}
--
Rion
On Aug 13, 2014, at 6:12 PM, Dennis Roberts <dennis at iplantcollaborative.org<mailto:dennis at iplantcollaborative.org>> wrote:
I was hoping to find a way to subscribe to all possible job status change events using a single notification request. I found a note on the notifications documentation page, http://agaveapi.co/notifications-and-events/, that seems to indicate that it’s possible to do that by specifying a wildcard for the name of the event. When I tried this, however, no notifications were registered at all. Am I doing something wrong?
Here’s an EDN version of the job request:
{:notifications
[{:url
"https://de-2.iplantc.org/de/agave-cb/077ec168-93fb-4a1b-aede-ca5e597cde75?status=${JOB_STATUS}&external-id=${JOB_ID}&end-time=${JOB_END_TIME}",
:event "*"}],
:archiveSystem "irods-2.iplantcollaborative.org<http://irods-2.iplantcollaborative.org/>",
:archivePath "/dennis/analyses/wc_08131601-2014-08-13-23-01-12.6",
:archive true,
:appId "failing-word-count-0.0.1",
:name "wc_08131601",
:inputs
{:wcInput
"agave://irods-2.iplantcollaborative.org/dennis/test_clear_range.fastq"},
:parameters {}}
When formatted as JSON the job request would look like this:
{"notifications":
[{"url":
"https://de-2.iplantc.org/de/agave-cb/077ec168-93fb-4a1b-aede-ca5e597cde75?status=${JOB_STATUS}&external-id=${JOB_ID}&end-time=${JOB_END_TIME}",
"event": "*"}],
"archiveSystem": "irods-2.iplantcollaborative.org<http://irods-2.iplantcollaborative.org/>",
"archivePath":"/dennis/analyses/wc_08131601-2014-08-13-23-01-12.6",
"archive":true,
"appId":"failing-word-count-0.0.1",
"name":"wc_08131601",
"inputs":
{"wcInput":
"agave://irods-2.iplantcollaborative.org/dennis/test_clear_range.fastq"},
"parameters":{}}
Thanks,
Dennis
_______________________________________________
Iplant-api-dev Mailing List: Iplant-api-dev at iplantcollaborative.org<mailto:Iplant-api-dev at iplantcollaborative.org>
List Info and Archives: http://mail.iplantcollaborative.org/mailman/listinfo/iplant-api-dev
One-click Unsubscribe: http://mail.iplantcollaborative.org/mailman/options/iplant-api-dev/dooley%40tacc.utexas.edu?unsub=1&unsubconfirm=1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iplantcollaborative.org/pipermail/iplant-api-dev/attachments/20140813/51489913/attachment-0001.html
More information about the Iplant-api-dev
mailing list