diff options
Diffstat (limited to 'module')
| -rw-r--r-- | module/common/APIExerciser.py | 16 | ||||
| -rw-r--r-- | module/database/FileDatabase.py | 2 | 
2 files changed, 11 insertions, 7 deletions
| diff --git a/module/common/APIExerciser.py b/module/common/APIExerciser.py index 7cc30c6a1..f782efa53 100644 --- a/module/common/APIExerciser.py +++ b/module/common/APIExerciser.py @@ -36,7 +36,7 @@ def startApiExerciser(core, n):  class APIExerciser(Thread): -    def __init__(self, core, thrift=False): +    def __init__(self, core, thrift=False, user=None, pw=None):          global idPool          Thread.__init__(self) @@ -46,18 +46,19 @@ class APIExerciser(Thread):          self.time = time()          if thrift: -            self.api = ThriftClient() -            self.api.login("user", "pw") +            self.api = ThriftClient(user=user, password=pw)          else:              self.api = core.api          self.id = idPool -        self.core.log.info("API Excerciser started %d" % self.id) +        if core: +            self.core.log.info("API Excerciser started %d" % self.id) +          idPool += 1 -        self.start() +        #self.start()      def run(self):          out = open("error.log", "ab") @@ -150,4 +151,7 @@ class APIExerciser(Thread):              self.api.getPackageData(choice(info).pid)      def getAccounts(self): -        self.api.getAccounts(False)
\ No newline at end of file +        self.api.getAccounts(False) + +    def getCaptchaTask(self): +        self.api.getCaptchaTask(False)
\ No newline at end of file diff --git a/module/database/FileDatabase.py b/module/database/FileDatabase.py index 564fc4562..d51241591 100644 --- a/module/database/FileDatabase.py +++ b/module/database/FileDatabase.py @@ -175,7 +175,7 @@ class FileHandler:          packs = self.packageCache.values()          for pack in packs: -            if pack.queue != queue and p.order < oldorder: +            if pack.queue == p.queue and p.order < oldorder:                  pack.order -= 1                  pack.notifyChange() | 
