Open 0xgeert opened 10 years ago
Circumvented inability of upstream sailsJS to pass custom options:
__batch: {
batchid: batchid,
size: size
}
Therefore we pass it in obj.previous
. This has no influence on potential cascade callspublishAdd/remove
which are potentially performed when calling publishDestroy/publishUpdate
.
Lastly, __batch
is cleaned from obj.previous
before passing it to the dispatcher
Note that you can override publishUpdate on a per-model basis by declaring it in your model class file, or for all models by declaring it in config/models.js
If received actions have a
batch
object with props:size
andcur
this would make batching pretty easy. There needs to be a timeout though