Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CDEK Development
cdek-warehouse
Commits
d93a97af
Commit
d93a97af
authored
7 years ago
by
d.maklakov
Browse files
Options
Download
Email Patches
Plain Diff
Обернул дамп ОСО для перехвата исключений.
parent
8589e7c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
warehouse-common/warehouse-services/src/main/java/com/cdek/warehouse/services/gateway/impl/DumpOsoProcessorImpl.java
+12
-5
...warehouse/services/gateway/impl/DumpOsoProcessorImpl.java
warehouse-common/warehouse-services/src/main/java/com/cdek/warehouse/services/gateway/load/DumpOsoEntityType.java
+0
-1
...ek/warehouse/services/gateway/load/DumpOsoEntityType.java
with
12 additions
and
6 deletions
+12
-6
warehouse-common/warehouse-services/src/main/java/com/cdek/warehouse/services/gateway/impl/DumpOsoProcessorImpl.java
View file @
d93a97af
...
...
@@ -48,11 +48,18 @@ public class DumpOsoProcessorImpl implements DumpOsoProcessor {
public
void
processDumpOsoQueue
()
{
StatisticEk4
statistic
=
new
StatisticEk4
();
do
{
LOG
.
info
(
String
.
format
(
"Start to process Dump OSO chunk: offset=%d, size=%d"
,
queueOffset
,
DUMP_OSO_CHUNK_SIZE
));
statistic
=
synchronizeChunk
(
DUMP_OSO_CHUNK_SIZE
,
queueOffset
,
statistic
);
queueOffset
+=
statistic
.
chunkOsoEventCount
;
LOG
.
info
(
String
.
format
(
"Dump OSO chunk is processed: events count=%d"
,
statistic
.
chunkOsoEventCount
));
try
{
LOG
.
info
(
String
.
format
(
"Start to process Dump OSO chunk: offset=%d, size=%d"
,
queueOffset
,
DUMP_OSO_CHUNK_SIZE
));
statistic
=
synchronizeChunk
(
DUMP_OSO_CHUNK_SIZE
,
queueOffset
,
statistic
);
queueOffset
+=
statistic
.
chunkOsoEventCount
;
LOG
.
info
(
String
.
format
(
"Dump OSO chunk is processed: events count=%d"
,
statistic
.
chunkOsoEventCount
));
}
catch
(
Exception
ex
)
{
LOG
.
error
(
String
.
format
(
"Dump OSO processing failed on chunk: offset=%d, size=%d"
,
queueOffset
,
DUMP_OSO_CHUNK_SIZE
),
ex
);
}
catch
(
Throwable
ex
)
{
LOG
.
error
(
"Dump OSO processing catch throwable"
,
ex
);
throw
ex
;
}
}
while
(
statistic
.
chunkOsoEventCount
!=
0
);
logStatistic
(
statistic
);
...
...
This diff is collapsed.
Click to expand it.
warehouse-common/warehouse-services/src/main/java/com/cdek/warehouse/services/gateway/load/DumpOsoEntityType.java
View file @
d93a97af
...
...
@@ -34,7 +34,6 @@ public enum DumpOsoEntityType {
return
concrete
;
}
}
//throw new IllegalArgumentException(String.format("Incorrect event type (%d) for warehouse event queue", type));
return
null
;
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help