In my project , I got a wired issue. ```// trigger...
# spring
h
In my project , I got a wired issue.
Copy code
// trigger a scheduled task to parse cvs
// aList is parsed from a cvs file.
aList.forEach{
    // use it.refId to query extra record from our database.
    val extra = repository.findByRefId(it.refId)
    if(it.status == 'error'{ 
        //do some update on extra by it.status condition
        extra.status = 'error'
        repository.save(extra) // A kotlin coroutines repository
    }
}

// in the last scheduled task, only one status(error) is needed to updated
// but finally after the iteration, all records are updated the error status