CC-1799 Put Airtime Storage into a Human Readable File Naming Convention
removing watch/adding new watch when changing stor directory.
This commit is contained in:
parent
6adce1ba45
commit
e803b76fcf
1 changed files with 7 additions and 0 deletions
|
@ -238,10 +238,17 @@ class AirtimeNotifier(Notifier):
|
|||
new_storage_directory = m['directory'].encode('utf-8')
|
||||
|
||||
mm = self.proc_fun()
|
||||
|
||||
wd = mm.wm.get_wd(storage_directory)
|
||||
self.logger.info("Removing watch on: %s wd %s", storage_directory, wd)
|
||||
mm.wm.rm_watch(wd, rec=True)
|
||||
|
||||
mm.set_needed_file_permissions(new_storage_directory, True)
|
||||
mm.move_file(storage_directory, new_storage_directory)
|
||||
storage_directory = new_storage_directory
|
||||
|
||||
mm.watch_directory(new_storage_directory)
|
||||
|
||||
|
||||
def update_airtime(self, d):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue