October 2018
Intermediate to advanced
420 pages
10h 26m
English
The final step is to use the inotify driver in the application. It must first be added in the driver, source, and sink of the application entry point:
Drivers = namedtuple('Drivers', ['encoder', 'httpd', 's3', 'file', 'inotify', 'argv'])Source = namedtuple('Source', ['encoder', 'httpd', 's3', 'file', 'inotify', 'argv'])Sink = namedtuple('Sink', ['encoder', 'httpd', 's3', 'file', 'inotify'])
The inotify driver must be created in the constructor of the Drivers object when the run function is called. Then it can be configured:
monitor_init = ( parsed_argv .flat_map(lambda i : Observable.from_([ inotify.AddWatch(id='config', path=i.value, flags=aionotify.Flags.MODIFY), inotify.Start(), ])) )