Esempio n. 1
0
  def __init__(self):
    hive.loadLogger()
    self.log = logging.getLogger('botqueue')
    self.workers = {}
    self.workerDataAge = {}
    self.config = hive.config.get()
    self.lastScanData = None
    
    #check for default info.
    if not 'app_url' in self.config:
      self.config['app_url'] = "https://www.botqueue.com"
      hive.config.save(self.config)

    #create a unique hash that will identify this computers requests
    if 'uid' not in self.config or not self.config['uid']:
      self.config['uid'] = hashlib.sha1(str(time.time())).hexdigest()
      hive.config.save(self.config)   

    #slicing options moved to driver config
    if 'can_slice' in self.config:
      del self.config['can_slice']
      hive.config.save(self.config)   
      
    #load up our api
    self.api = botqueueapi.BotQueueAPI()
      
    #this is our threading tracker
    stacktracer.trace_start("trace.html", interval=5, auto=True) # Set auto flag to always update file!
Esempio n. 2
0
 def __init__(self):
   hive.loadLogger()
   self.log = logging.getLogger('botqueue')
   self.api = botqueueapi.BotQueueAPI()
   self.workers = []
   self.bots = []
   self.config = hive.config.get()
Esempio n. 3
0
 def __init__(self):
   hive.loadLogger()
   self.log = logging.getLogger('botqueue')
   self.api = botqueueapi.BotQueueAPI()
   self.workers = []
   self.bots = []
   self.config = hive.config.get()
Esempio n. 4
0
  def __init__(self):
    hive.loadLogger()
    self.log = logging.getLogger('botqueue')
    self.api = botqueueapi.BotQueueAPI()
    self.workers = []
    self.bots = []
    self.config = hive.config.get()
    
    #check for default info.
    if not 'can_slice' in self.config:
      self.config['can_slice'] = True
      hive.config.save(self.config)

    #check for default info.
    if not 'app_url' in self.config:
      self.config['app_url'] = "https://www.botqueue.com"
      hive.config.save(self.config)

    #create a unique hash that will identify this computers requests
    if not self.config['uid']:
      self.config['uid'] = hashlib.sha1(str(time.time())).hexdigest()
      hive.config.save(self.config)    
Esempio n. 5
0
 def __init__(self):
   hive.loadLogger()
   self.api = botqueueapi.BotQueueAPI()
   self.config = hive.config.get()