Describe the bug
If file decompression is run on the Trollmoves Server, the files will always be decompressed to a working directory (/tmp by default on Linux). These decompressed files are deleted only if they have been transferred.
To Reproduce
Run a Trollmoves Server watching a directory where compressed files are arriving, and have it decompress the files.
Expected behavior
All the decompressed files should be deleted after remove_delay (by default 30 seconds) has been passed.
Actual results
The files are scheduled for deletion only if they are requested and transferred successfully. The relevant parts of trollmoves.server module are:
- https://github.com/pytroll/trollmoves/blob/main/trollmoves/server.py#L252
which is called from
|
error_message = self._move_file(pathname, message, rel_path) |
which is called from
|
new_msg = self._move_files(message) |
which is called from
|
Thread(target=self.reply_and_send, args=(self.push, address, message)).start() |
which is called from
|
self._process_request(Message(rawstr=payload), address) |
which is called from
-
which is called from
-
So due to the scheduling for deletion happening only for push messages (point 5 above), the files will remain in the working directory when there are no push requests. This can happen when
- the Client(s) are stopped/crashed
- there are multiple Servers hosting the data, so only one of the receives the
push request
Describe the bug
If file decompression is run on the Trollmoves Server, the files will always be decompressed to a working directory (
/tmpby default on Linux). These decompressed files are deleted only if they have been transferred.To Reproduce
Run a Trollmoves Server watching a directory where compressed files are arriving, and have it decompress the files.
Expected behavior
All the decompressed files should be deleted after
remove_delay(by default 30 seconds) has been passed.Actual results
The files are scheduled for deletion only if they are requested and transferred successfully. The relevant parts of
trollmoves.servermodule are:which is called from
trollmoves/trollmoves/server.py
Line 230 in 2d84dbb
which is called from
trollmoves/trollmoves/server.py
Line 213 in 2d84dbb
which is called from
trollmoves/trollmoves/server.py
Line 354 in 2d84dbb
which is called from
trollmoves/trollmoves/server.py
Line 327 in 2d84dbb
which is called from
trollmoves/trollmoves/server.py
Line 311 in 2d84dbb
which is called from
trollmoves/bin/move_it_server.py
Line 133 in 2d84dbb
So due to the scheduling for deletion happening only for
pushmessages (point 5 above), the files will remain in the working directory when there are no push requests. This can happen whenpushrequest