You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using use_tmp_file = True in trollflow2 yaml products will be created with a tempfile. The duration of the begin of creating the file and finish writing can be a relatively long period of time; up to 20 minutes (NOAA-20, S-NPP).
In DWD we use a file distribution system, which distribute new files to a number of customers. Only new products should be distributed. We recognize new files by the modification time by using the find command (e.g. -mmin 1).
The finished product will have the timestamp of file creation.
So with long creation durations the distribution program doesn't recognize such products as new files any more and there will be no distribution to our customers.
... like Linux touch command
When using
use_tmp_file = True
in trollflow2 yaml products will be created with a tempfile. The duration of the begin of creating the file and finish writing can be a relatively long period of time; up to 20 minutes (NOAA-20, S-NPP).In DWD we use a file distribution system, which distribute new files to a number of customers. Only new products should be distributed. We recognize new files by the modification time by using the find command (e.g. -mmin 1).
The finished product will have the timestamp of file creation.
So with long creation durations the distribution program doesn't recognize such products as new files any more and there will be no distribution to our customers.
What I want to achive is a behaviour like the touch command in Linux.
And indeed, there is Python function in the relatively new Pathlib called
touch()
(https://docs.python.org/3/library/pathlib.html?highlight=touch#pathlib.Path.touch).After the file is completely written, the file mtime should be updated, to indicate, that it is a new file.
I suppose there is no compatibilty break with this feature.
Example, where to implement:
... /venv-p3/lib/python3.6/site-packages/trollflow2/plugins/init.py
The text was updated successfully, but these errors were encountered: