sr_sarra configuration "delete true" does not work if the type of file is retrieving is "file://". It works fine with sftp:// or ftp://.
For instance I am running an sr_watch with the following configuration:
broker amqp://local@some-server/
to TEST
url file://data/incoming/files/
path /data/incoming/files
events created|modified
And I have a sr_sarra instance with the following configuration:
broker amqp://feeder@some-server/
exchange xs_local
subtopic #
accept .*
source_from_exchange True
delete True
mirror False
url http://some-server/
cluster TEST
post_broker amqp://feeder@some-server/
post_exchange xpublic
document_root /data/web/some-server/public_data/
It doesn't use the "delete True". The code that downloads "File" type files doesn't code for that option, whereas the ftp and sftp types do. To get around this I had to create the sr_watch in the following manner:
broker amqp://local@some-server/
to TEST
url sftp://sarra@some-server/
path /data/incoming/files
events created|modified
and then the files were deleted fine. Though its probably not effecient to have to sftp or ftp to the same server sr_sarra is running on.
2c78f5cd51b9ac3d8389dc3f28d443135ab337d0
naive attempt at a bugfix here. the result passes self-test, but have not tested whether the fix is good.
If you can test it, would be helpful.
fix released in 2.17.02a1