Grails Method is executing asynchronously even when i have not applied any code for asynchronous execution

22 Views Asked by At

I am performing bulk download operation in a Groovy-Grail application, from a button where a call from java script ajax goes in controller. In controller method, it creates a zip file in /tmp directory. During the creation of this zip file,If I am navigating to some other page and performing other actions, i can track in logs that the process execution in other method is going in between zip file creation. Is it really asynchronous or my understanding of asynchronous is not correct. Below are my javascript ajax and controller code example -

$.ajax({
   url: bulkDownload,
   type: 'post',
   data: parameters,
   success: function (data) {
   loadSummaries();
   $("#abc").modal("hide");
   $(".pqr, .deleteSummary").prop('disabled', true)
 }
});

 def bulkDownload(){
     def IdsList = JSON.parse(params.ids) as JSONArray
    IdsList.each {
     // zip file code
 }
}
0

There are 0 best solutions below