Currently, all calls to the external services are done sequentially. If a user would have both a fitbit and a google fit account, this can easily result into 8 calls to the two services. It could be much faster if these calls could be done asynchronously, e.g.
Thread.new do
data[:activities] = data_aggregator.activities(from, to)
end
although using a library for this is preferred (e.g. sidekiq)
Currently, all calls to the external services are done sequentially. If a user would have both a fitbit and a google fit account, this can easily result into 8 calls to the two services. It could be much faster if these calls could be done asynchronously, e.g.
although using a library for this is preferred (e.g. sidekiq)