pytroll / pytroll-collectors

Collector modules for Pytroll
GNU General Public License v3.0
3 stars 18 forks source link

add on_moved process to watchdog trigger. #26

Closed yufeizhu600 closed 5 years ago

yufeizhu600 commented 5 years ago

In the case that a file has been moved to the target directory, python watchdog may only generated a 'moved' event; since there is no 'on_moved' method of the watchdogtrigger, the file will not trigger the processing even the file name matches the pattern.

This PR is to add on_moved event process to the watchdog trigger to deal with above case.

pnuu commented 5 years ago

Looks good to me. The code is almost identical to on_created(), so maybe they could call a common method and pass the appropriate path from the event to it?