[Opa] Scheduling troubles

Frederic Ye frederic.ye at mlstate.com
Fri Apr 13 09:14:06 UTC 2012


Hello,

Instead of Scheduler.wait(1), you can try with Scheduler.push(-> my_treatment())

Tip : You can write directly : #res2 <- Dom.of_xhtml(<>Finished</>)

On Apr 13, 2012, at 10:35 AM, Clement Le Marc wrote:

> Hi everyone,
> 
> I've been having some trouble with CPU intensive task blocking the whole server.
> The attached file will help to understand what's going on. I'm trying to import some email from a list (from an uploaded file but that's not really the problem here).
> 
> Basically I'm parsing each email to check its validity and if it is correct, I'm adding it to my db.
> "Normal" case: no problem appears (click1())
> "Bad" case, email are not parsing and we're in a close loop (click3()). jlog are not printed and no one can access the server anymore.
> A nasty fix consists in manually adding a Scheduler.wait(1) at the beginning of each loop (click2()).
> 
> And some other thing I just find out writing this few lines, the List.init() seems to be a perfect example of my problem, the server is not responding while initialising the list.
> 
> Clément
> <schedule.opa>_______________________________________________
> Opa mailing list
> Opa at lists.owasp.org
> https://lists.owasp.org/mailman/listinfo/opa

Frederic Ye.



More information about the Opa mailing list