|
|
@ -183,11 +183,9 @@ class Folders(Actor):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
def init(self,args):
|
|
|
|
def init(self,args):
|
|
|
|
Actor.init(self,args)
|
|
|
|
|
|
|
|
#self.lfolders = args['folders'] #config['folders']
|
|
|
|
#self.lfolders = args['folders'] #config['folders']
|
|
|
|
#self.action = args['action'] #{clear,archive} config['actions']['folders']
|
|
|
|
#self.action = args['action'] #{clear,archive} config['actions']['folders']
|
|
|
|
self.threshold = self.get_size( args['threshold']) #self.config['threshold'])
|
|
|
|
self.threshold = self.get_size( args['threshold']) #self.config['threshold'])
|
|
|
|
self.item = args['folders']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def archive(self,item):
|
|
|
|
def archive(self,item):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
@ -238,8 +236,6 @@ class Folders(Actor):
|
|
|
|
p : folder exists
|
|
|
|
p : folder exists
|
|
|
|
q : has_reached threashold
|
|
|
|
q : has_reached threashold
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
p = os.path.exists(item['label']) and item['label'] in self.lfolders
|
|
|
|
p = os.path.exists(item['label']) and item['label'] in self.lfolders
|
|
|
|
q = self.get_size(item['size']) >= self.threshold
|
|
|
|
q = self.get_size(item['size']) >= self.threshold
|
|
|
|
return p and q
|
|
|
|
return p and q
|
|
|
|