You could just push the newly generated mutations into a channel, which both these packages can access, maybe a new indexing package? And then have the worker iterate over the channel, batch them up and send to the right place.
2 Likes