A simple scenario, but forcing me to bang my head against the wall, since I can’t understand that this session “Without sleep mode is connected to the current stream”.
Use for implementation:
def records = SomeDomain.list() //split records into equal size chunks. def chunks = [][] // <- add records to chunks //now process each chunk in a different thread chunks.each { aChunk -> Thread.start { singletonInjectedService # processs(aChunk) } }
How to achieve this in the grail? No matter what the container is, Quartz Job, which wants to process "records" in multiple threads, or a Service that wants to process "records" in multiple threads, it simply fails with "No sleep mode associated with the current thread" .
A legitimate use case, but a pity it just doesn't work for me at all.
source share