From 6ba4f52c3526f1e4f2064ba0831634ccd88b8dcd Mon Sep 17 00:00:00 2001 From: "Steve L. Nyemba" Date: Mon, 4 Sep 2017 23:54:43 -0500 Subject: [PATCH] CO - polishing bug fix --- src/api/index.py | 10 +++++++--- src/utils/agents/actor.py | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/api/index.py b/src/api/index.py index 496699f..a0dea6e 100644 --- a/src/api/index.py +++ b/src/api/index.py @@ -245,6 +245,7 @@ def InitCollector(): r = [] manager={} try: + key = request.headers['key'] node= request.headers['id'] #scope=request.headers['scope'] if 'scope' in request.headers else {} @@ -267,9 +268,11 @@ def InitCollector(): agent.init(args) lagents.append(agent) - if id in a : - actor = eval(a[id]+"()") - lactors.append(actor) + if id in a : + #-- This variable should not be confused with defined namespace + + _actor = eval(a[id]+"()") + lactors.append(_actor) config = dict(CONFIG) # @@ -512,3 +515,4 @@ if __name__== '__main__': SYS_ARGS.PARAMS['port'] = 8484 PORT = int(SYS_ARGS.PARAMS['port']) app.run(host='0.0.0.0' ,port=PORT,debug=True,threaded=True) + diff --git a/src/utils/agents/actor.py b/src/utils/agents/actor.py index 7e2c85e..d53cffe 100644 --- a/src/utils/agents/actor.py +++ b/src/utils/agents/actor.py @@ -175,6 +175,8 @@ class Mailer (Actor): class Folders(Actor): + def __init__(self): + Actor.__init__(self) """ This is designed to handle folders i.e cleaning/archiving the folders if the user does NOT have any keys to cloud-view than she will not be able to archive @@ -187,7 +189,7 @@ class Folders(Actor): #self.lfolders = args['folders'] #config['folders'] #self.action = args['action'] #{clear,archive} config['actions']['folders'] self.threshold = self.get_size( args['threshold']) #self.config['threshold']) - self.item = item + self.item = args['folders'] def archive(self,item): """