Fixes in updates
This commit is contained in:
parent
7a3fe536a8
commit
14b28c05ca
2 changed files with 11 additions and 4 deletions
|
|
@ -519,9 +519,12 @@ def pastafari2_get_multiprogress():
|
|||
|
||||
ids=request.args.get('ids', '[]')
|
||||
|
||||
position=0
|
||||
#position=0
|
||||
|
||||
#position=int(request.args.get('position', '0'))
|
||||
try:
|
||||
position=int(request.args.get('position', '0'))
|
||||
except:
|
||||
position=0
|
||||
|
||||
final_ids=[str(i) for i in json.loads(ids)]
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ ids=[];
|
|||
|
||||
task_completed=0;
|
||||
|
||||
position=0;
|
||||
|
||||
//Get all tasks, next process 50 next progress.
|
||||
$.ajax({
|
||||
url: "${url_for('.pastafari2_get_servers_task')}",
|
||||
|
|
@ -60,7 +62,7 @@ $.ajax({
|
|||
function get_log() {
|
||||
|
||||
$.ajax({
|
||||
url: "${url_for('.pastafari2_get_multiprogress')}?position=",
|
||||
url: "${url_for('.pastafari2_get_multiprogress')}?position="+position,
|
||||
data: {ids: JSON.stringify(ids)},
|
||||
success: function (data) {
|
||||
|
||||
|
|
@ -84,7 +86,7 @@ function get_log() {
|
|||
|
||||
task_completed++;
|
||||
|
||||
|
||||
console.log('Task completed '+data[i].task_id);
|
||||
|
||||
if(data[i].error==0) {
|
||||
|
||||
|
|
@ -100,6 +102,8 @@ function get_log() {
|
|||
|
||||
}
|
||||
|
||||
position++;
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue