We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48bee57 commit 2d44e5cCopy full SHA for 2d44e5c
bin/import_mails
@@ -14,6 +14,8 @@ end.parse!(into: params)
14
15
list = List.find_by_name(params[:list])
16
17
+errors = []
18
+
19
Message.transaction do
20
(params[:from]..params[:to]).each do |seq|
21
begin
@@ -29,7 +31,10 @@ Message.transaction do
29
31
rescue ActiveRecord::RecordNotUnique
30
32
STDERR.puts("#{list}:#{seq} already exists in Postgres")
33
rescue StandardError => e
34
+ errors << [seq, e]
35
STDERR.puts("failed to import #{list}:#{seq}: #{e}")
36
end
37
38
39
40
+pp errors if errors.any?
0 commit comments