hekenga 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/hekenga/document_task_executor.rb +16 -3
- data/lib/hekenga/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55037feb4349d723dd34938f3eb9aab8431bad7f287081b685705c6a6d40b046
|
4
|
+
data.tar.gz: 896bdc203b3f30c543a4f7265bdea16e128d64ed59456e32cecb683a789f684c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69a634184500d3c5cca3298a3793c0e5f496d31f935af6265840e1ab7e576de9bc06623cff8c03738fed9f2028146d460fd7ed04cd71e3f684c890a792d6986e
|
7
|
+
data.tar.gz: 2b916adfaa97a95fa645cd6442aefacd5125f78c2b62ff1b13bfa237e373998ecd44f0c88bdc0b7a239afa9e8f25e2bfb2cc05a4de11f142898c42ce963f246c
|
data/CHANGELOG.md
CHANGED
@@ -13,6 +13,7 @@ module Hekenga
|
|
13
13
|
@skipped_records = []
|
14
14
|
@failed_records = []
|
15
15
|
@backed_up_records = {}
|
16
|
+
@seen_errors = []
|
16
17
|
end
|
17
18
|
|
18
19
|
def run!
|
@@ -48,7 +49,9 @@ module Hekenga
|
|
48
49
|
|
49
50
|
delegate :task_idx, to: :task_record
|
50
51
|
|
51
|
-
attr_reader :migrated_records, :records_to_write, :filtered_records,
|
52
|
+
attr_reader :migrated_records, :records_to_write, :filtered_records,
|
53
|
+
:invalid_records, :skipped_records, :failed_records, :backed_up_records,
|
54
|
+
:seen_errors
|
52
55
|
|
53
56
|
def migration_complete?
|
54
57
|
migration.task_records(task_idx).incomplete.none?
|
@@ -84,7 +87,8 @@ module Hekenga
|
|
84
87
|
else
|
85
88
|
skipped_records << record
|
86
89
|
end
|
87
|
-
rescue =>
|
90
|
+
rescue => e
|
91
|
+
print_error(e)
|
88
92
|
failed_records << record
|
89
93
|
end
|
90
94
|
end
|
@@ -94,7 +98,8 @@ module Hekenga
|
|
94
98
|
backup_record(record)
|
95
99
|
task.up!(@context, record)
|
96
100
|
migrated_records << record
|
97
|
-
rescue =>
|
101
|
+
rescue => e
|
102
|
+
print_error(e)
|
98
103
|
failed_records << record
|
99
104
|
end
|
100
105
|
end
|
@@ -268,5 +273,13 @@ module Hekenga
|
|
268
273
|
def task
|
269
274
|
@task ||= migration.tasks[task_idx]
|
270
275
|
end
|
276
|
+
|
277
|
+
def print_error(error)
|
278
|
+
message = [error.message, error.backtrace].join("\n")
|
279
|
+
return if seen_errors.include?(message.hash)
|
280
|
+
|
281
|
+
seen_errors << message.hash
|
282
|
+
Hekenga.log(message)
|
283
|
+
end
|
271
284
|
end
|
272
285
|
end
|
data/lib/hekenga/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hekenga
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tapio Saarinen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|