Skip to content
Browse files

#4135 fixed issue with single file polling

  • Loading branch information...
1 parent f1681d3 commit 7f053939f6dd5c3367b8d120b2d27b409f5cdc66 @ddossot ddossot committed
View
4 src/main/java/eu/openanalytics/rsb/component/DirectoryDepositHandler.java
@@ -205,11 +205,11 @@ public void handleJob(final Message<File> message) throws IOException
catch (final Exception e)
{
final MultiFilesResult errorResult = job.buildErrorResult(e, getMessages());
- handleDirectoryResult(errorResult);
+ handleResult(errorResult);
}
}
- public void handleDirectoryResult(final MultiFilesResult result) throws IOException
+ public void handleResult(final MultiFilesResult result) throws IOException
{
final File resultFile = MultiFilesResult.zipResultFilesIfNotError(result);
final File resultsDirectory = new File((File) result.getMeta().get(DEPOSIT_ROOT_DIRECTORY_META_NAME),
View
2 src/main/resources/META-INF/spring/jms-beans.xml
@@ -69,7 +69,7 @@
<jms:listener-container connection-factory="amqConnectionFactory"
acknowledge="transacted">
<jms:listener id="directoryResultMessageListener" destination="r.results.>" ref="directoryDepositHandler"
- method="handleZipResult"
+ method="handleResult"
selector="#{T(eu.openanalytics.rsb.Constants).SOURCE_MESSAGE_HEADER} = '#{T(eu.openanalytics.rsb.message.AbstractWorkItem$Source).DIRECTORY}'" />
</jms:listener-container>
View
4 src/test/java/eu/openanalytics/rsb/component/DirectoryDepositHandlerTestCase.java
@@ -148,7 +148,7 @@ private void testHandleJob(final File jobParentFile, final File zipJobFile) thro
}
@Test
- public void handleZipResult() throws IOException
+ public void handleResult() throws IOException
{
final Map<String, Serializable> meta = new HashMap<String, Serializable>();
meta.put(DirectoryDepositHandler.DEPOSIT_ROOT_DIRECTORY_META_NAME, FileUtils.getTempDirectory());
@@ -159,6 +159,6 @@ public void handleZipResult() throws IOException
when(multiFilesResult.getTemporaryDirectory()).thenReturn(FileUtils.getTempDirectory());
when(multiFilesResult.getMeta()).thenReturn(meta);
- directoryDepositHandler.handleDirectoryResult(multiFilesResult);
+ directoryDepositHandler.handleResult(multiFilesResult);
}
}

0 comments on commit 7f05393

Please sign in to comment.
Something went wrong with that request. Please try again.