diff --git a/.app_version b/.app_version index ee6cdce3..b6160487 100644 --- a/.app_version +++ b/.app_version @@ -1 +1 @@ -0.6.1 +0.6.2 diff --git a/CHANGELOG.md b/CHANGELOG.md index d1d36f9e..b7f8aa7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,11 @@ Please update your `docker-compose.yml` file to include the following changes: - Fixed a bug where the export file was not being created in the public folder +--- +## [0.6.2] — 2024-06-14 + +This is a debugging release. No changes were made to the application. + --- ## [0.6.0] — 2024-06-12 diff --git a/app/services/exports/create.rb b/app/services/exports/create.rb index 7cfcb6d2..5f62ad6d 100644 --- a/app/services/exports/create.rb +++ b/app/services/exports/create.rb @@ -11,7 +11,12 @@ class Exports::Create def call export.update!(status: :processing) - points = time_framed_points(start_at, end_at, user) + pp "====Exporting data for #{user.email} from #{start_at} to #{end_at}" + + points = time_framed_points + + pp "====Exporting #{points.count} points" + data = ::ExportSerializer.new(points, user.email).call file_path = Rails.root.join('public', 'exports', "#{export.name}.json") @@ -28,7 +33,10 @@ class Exports::Create attr_reader :user, :export, :start_at, :end_at - def time_framed_points(start_at, end_at, user) - user.tracked_points.without_raw_data.where('timestamp >= ? AND timestamp <= ?', start_at.to_i, end_at.to_i) + def time_framed_points + user + .tracked_points + .without_raw_data + .where('timestamp >= ? AND timestamp <= ?', start_at.to_i, end_at.to_i) end end diff --git a/app/views/exports/index.html.erb b/app/views/exports/index.html.erb index a1b1c9b4..c50ed743 100644 --- a/app/views/exports/index.html.erb +++ b/app/views/exports/index.html.erb @@ -25,6 +25,7 @@