cc-4105: added command line option parsing
This commit is contained in:
parent
ee1491a487
commit
745221f77c
4 changed files with 46 additions and 23 deletions
|
@ -79,8 +79,8 @@ class BaseEvent(Loggable):
|
|||
# nothing to see here, please move along
|
||||
def morph_into(self, evt):
|
||||
"""
|
||||
'Morphing' should preserve the self.cookie invariant. I.e. either
|
||||
None -> None or int -> int
|
||||
'Morphing' should preserve the self.cookie invariant. I.e.
|
||||
either should either stay an integer or stay none.
|
||||
"""
|
||||
self.logger.info("Morphing '%s' into '%s'" % (self.__class__.__name__,
|
||||
evt.__class__.__name__))
|
||||
|
|
|
@ -10,23 +10,25 @@ from media.monitor.events import OrganizeFile, NewFile, MoveFile, DeleteFile, \
|
|||
from media.monitor.log import Loggable, get_logger
|
||||
|
||||
# We attempt to document a list of all special cases and hacks that the
|
||||
# following classes should be able to handle. TODO : implement all of the
|
||||
# following special cases
|
||||
# following classes should be able to handle. TODO : implement all of
|
||||
# the following special cases
|
||||
#
|
||||
# properly as they only send a request for the dir and not for every file. Also
|
||||
# more hacks are needed to check that the directory finished moving/copying?
|
||||
# properly as they only send a request for the dir and not for every
|
||||
# file. Also more hacks are needed to check that the directory finished
|
||||
# moving/copying?
|
||||
#
|
||||
# - In the case when a 'watched' directory's subdirectory is delete we should
|
||||
# send a special request telling ApiController to delete a whole dir. This is
|
||||
# done becasue pyinotify will not send an individual file delete event for
|
||||
# every file in that directory
|
||||
# - In the case when a 'watched' directory's subdirectory is delete we
|
||||
# should send a special request telling ApiController to delete a whole
|
||||
# dir. This is done becasue pyinotify will not send an individual file
|
||||
# delete event for every file in that directory
|
||||
#
|
||||
# - Special move events are required whenever a file is moved from a 'watched'
|
||||
# directory into another 'watched' directory (or subdirectory). In this case we
|
||||
# must identify the file by its md5 signature instead of it's filepath like we
|
||||
# usually do. Maybe it's best to always identify a file based on its md5
|
||||
# signature?. Of course that's not possible for some modification events
|
||||
# because the md5 signature will change...
|
||||
# - Special move events are required whenever a file is moved
|
||||
# from a 'watched' directory into another 'watched' directory (or
|
||||
# subdirectory). In this case we must identify the file by its md5
|
||||
# signature instead of it's filepath like we usually do. Maybe it's
|
||||
# best to always identify a file based on its md5 signature?. Of course
|
||||
# that's not possible for some modification events because the md5
|
||||
# signature will change...
|
||||
|
||||
# Note: Because of the way classes that inherit from pyinotify.ProcessEvent
|
||||
# interact with constructors. you should only instantiate objects from them
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue