Skip to content

Commit e2f12ef

Browse files
committed
also perform sync steps and do onSuccess if skipped after migrate
operation completes Signed-off-by: Xin Li <[email protected]>
1 parent fa4a246 commit e2f12ef

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

importer/src/main/java/org/hiero/mirror/importer/migration/AsyncJavaMigration.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ public void handle(Event event, Context context) {
132132
return;
133133
}
134134

135+
if (!performSynchronousSteps()) {
136+
onSuccess();
137+
return;
138+
}
139+
135140
runMigrateAsync();
136141
}
137142

@@ -159,10 +164,7 @@ protected void doMigrate() throws IOException {
159164
throw new IllegalArgumentException(String.format("Invalid non-positive success checksum %d", checksum));
160165
}
161166

162-
shouldMigrate.set(performSynchronousSteps());
163-
if (!shouldMigrate.get()) {
164-
onSuccess();
165-
}
167+
shouldMigrate.set(true);
166168
}
167169

168170
protected abstract T getInitial();

0 commit comments

Comments
 (0)