Error on async job

前端 未结 4 1279
轻奢々
轻奢々 2021-02-20 16:39

I\'m trying to create an async task that will not block the request. The user make the request, the task will start, and the controller will render \"Job is running...\", this i

4条回答
  •  鱼传尺愫
    2021-02-20 16:57

    When creating a Promise async task inside a controller you actually have to return the response by calling the get() method on the task, or the onError and onComplete methods will never be called. Adding:

    job1.get()
    

    Before your call to render will resolve the issue.

提交回复
热议问题