Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public Future<Void> postInit(Vertx vertx, String tenant, JsonObject tenantAttrib
logger.info("Tenant '{}' database initialized", tenant))
.compose(x ->
clearTenantFileQueues(vertx, tenant, getTenantParameter(tenantAttributes, "clearPastFileQueues")))
.compose(na -> FileListeners.clearRegistry());
.compose(na -> FileListeners.clearRegistry(tenant));
}

private static String getTenantParameter(JsonObject attributes, String parameterKey) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ public static Future<String> undeployIfDeployed(ServiceRequest request, Channel
* Un-deploys and de-registers listener verticles that otherwise would
* survive across test method invocations.
*/
public static Future<Void> clearRegistry() {
public static Future<Void> clearRegistry(String tenant) {
List<Future<Void>> undeployFutures = new ArrayList<>();
for (Map.Entry<String, ConcurrentMap<String, FileListener>> tenant : FILE_LISTENERS.entrySet()) {
for (Map.Entry<String, FileListener> listener : FILE_LISTENERS.get(tenant.getKey()).entrySet()) {
FileListener fileListener = FILE_LISTENERS.get(tenant.getKey()).get(listener.getKey());
if (FILE_LISTENERS.get(tenant) != null) {
for (Map.Entry<String, FileListener> listener : FILE_LISTENERS.get(tenant).entrySet()) {
FileListener fileListener = FILE_LISTENERS.get(tenant).get(listener.getKey());
undeployFutures.add(fileListener.deploymentVertx.undeploy(fileListener.deploymentId));
}
}
Expand Down
Loading