Fix batching for calculations.

I'd make this follow the same pattern as insert-measurements in misc.clj