projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
400db58
)
Raise exception if there is an error, and import tracepoints in batches
author
Andy Allan
<git@gravitystorm.co.uk>
Wed, 6 Mar 2019 08:27:33 +0000
(09:27 +0100)
committer
Andy Allan
<git@gravitystorm.co.uk>
Wed, 20 Mar 2019 09:35:40 +0000
(10:35 +0100)
app/models/trace.rb
patch
|
blob
|
history
diff --git
a/app/models/trace.rb
b/app/models/trace.rb
index bd8ab72b3cfe340eb62ed068a8ac6068cab20fed..3d23d02c8d7da728c47f9234beb0a08873b6ea3f 100644
(file)
--- a/
app/models/trace.rb
+++ b/
app/models/trace.rb
@@
-313,7
+313,7
@@
class Trace < ActiveRecord::Base
tp.run_callbacks(:save) { false }
tp.run_callbacks(:create) { false }
end
- Tracepoint.import
(tracepoints
)
+ Tracepoint.import
!(tracepoints, :batch_size => 1_000
)
if gpx.actual_points.positive?
max_lat = Tracepoint.where(:gpx_id => id).maximum(:latitude)