Rename api.taskStatus to api.getTaskStatus

still register api.taskStatus since its used
in pandora_client and other scripts.

fixes #2600 and fixes #2859
This commit is contained in:
j 2016-02-20 13:01:49 +00:00
parent e47c652ad0
commit 11924fcb0d
3 changed files with 7 additions and 6 deletions

View file

@ -159,7 +159,7 @@ def addAnnotation(request, data):
... // more annotation properties
}
see: addAnnotations, editAnnotation, findAnnotations, getAnnotation,
taskStatus, removeAnnotation
getTaskStatus, removeAnnotation
'''
for key in ('item', 'layer', 'in', 'out', 'value'):
if key not in data:
@ -213,10 +213,10 @@ def addAnnotations(request, data):
]
}
returns {
taskId: string // task id, use `taskStatus` to poll
taskId: string // task id, use `getTaskStatus` to poll
}
see: addAnnotation, editAnnotation, findAnnotations, getAnnotation,
taskStatus, removeAnnotation
getTaskStatus, removeAnnotation
'''
for key in ('item', 'layer', 'annotations'):
if key not in data:

View file

@ -339,7 +339,7 @@ def direct_upload(request):
@login_required_json
def taskStatus(request, data):
def getTaskStatus(request, data):
'''
Gets the status for a given task
takes {
@ -373,7 +373,8 @@ def taskStatus(request, data):
'traceback': traceback
})
return render_to_json_response(response)
actions.register(taskStatus, cache=False)
actions.register(getTaskStatus, cache=False)
actions.register(getTaskStatus, action='taskStatus', cache=False)
@login_required_json

View file

@ -2647,7 +2647,7 @@ pandora.wait = function(taskId, callback, timeout) {
var task = {};
timeout = timeout || 5000;
task.timeout = setTimeout(function() {
pandora.api.taskStatus({taskId: taskId}, function(result) {
pandora.api.getTaskStatus({taskId: taskId}, function(result) {
var t;
if (result.data.status == 'PENDING') {
t = pandora.wait(taskId, callback);