That is thrown when the ActorSystem has terminated (scheduler stopped).
Perhaps a Play reload?

/Patrik
fre 5 maj 2017 kl. 12:27 skrev Praveen Yadav <prav...@zemosolabs.com>:

> Forgot to mention, we are using play 2.4.3
>
> Thanks
>
>
> On Friday, May 5, 2017 at 3:41:33 PM UTC+5:30, Praveen Yadav wrote:
>>
>> Hi,
>>
>> We are getting - "java.lang.IllegalStateException: cannot enqueue after
>> timer shutdown" at below scheduleOnce call line number when the for loop
>> has many items and play app is under load.
>>
>> We are currently refactoring the below code. But is there a possibility
>> that if we call Akka.system().scheduler().scheduleOnce multiple times in a
>> loop then
>> Scheduler will get stopped ? Is there any limit or something ?
>> Any guidance will be very helpful.
>>
>>
>> Thanks,
>> Praveen
>>
>>
>> for (Resource resource : resourceList) {
>>
>>    try {
>>       if ((!resource.getProviderFilePath().isEmpty()) && 
>> (resource.getProviderFilePath() != null)) {
>>          Akka.system().scheduler().scheduleOnce(new FiniteDuration(1, 
>> TimeUnit.MICROSECONDS), new Runnable() {
>>             @Override
>>             public void run() {
>>                deleteFile(resource, false);
>>             }
>>          }, Akka.system().dispatcher());
>>       }
>>    } catch (Exception e) {
>>       String msg = "Failed to delete resource " + resource.getId();
>>       Logger.error(msg);
>>       e.printStackTrace();
>>    }
>> }
>>
>> --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to