Recibo este error con la biblioteca Coalan Async.
Error: (nodo: 2172) UnhandledPromiseRejectionWarning: Error: Ya se llamó a la devolución de llamada.
Aquí está mi código:
const updateOrCreateTrips = (trips, done) => { const Trip = mongoose.connection.db.collection(...); console.log(`updating or creating ${trips.length} trips`); async.eachLimit(trips, 100, (trip, next) => { const {...rest} = trip; console.log(`updating trip (${id}) ${title}`); const tripToUpdate = {//some data here...} Trip.update( { _id: trip.wordpressId, }, { $set: tripToUpdate, $setOnInsert: { created: new Date(), enabled: true, }, }, { upsert: true, }, next ); }, done); };