Esempio n. 1
0
    def __init__(self):
        self.canUpgrade = False
        self.restart = False
        hive.loadLogger()
        self.log = logging.getLogger('botqueue')
        self.workers = {}
        self.config = bee_config.BeeConfig()
        self.lastScanData = None
        self.lastImageTime = time.time()
        self.quit = False

        # load up our api
        self.api = botqueueapi.BotQueueAPI(self.config)

        # 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):
        if auto_update:
            self.app = autoupgrade.AutoUpgrade(
                "bqclient", "https://pypi.python.org/simple")
        else:
            self.app = None
        self.screen = None
        self.lastScanUpdate = 0
        self.lastScreenUpdate = 0
        self.lastBotUpdate = 0
        self.lastUpgradeCheck = 0
        self.canUpgrade = False
        self.restart = False
        hive.loadLogger()
        self.log = logging.getLogger('botqueue')
        self.workers = {}
        self.workerDataAge = {}
        self.config = hive.config.get()
        self.lastScanData = None
        self.lastImageTime = time.time()
        self.quit = False

        # check for default info.
        if 'app_url' not 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. 3
0
    def __init__(self):
        if auto_update:
            self.app = autoupgrade.AutoUpgrade("bqclient", "https://pypi.python.org/simple")
        else:
            self.app = None
        self.screen = None
        self.lastScanUpdate = 0
        self.lastScreenUpdate = 0
        self.lastBotUpdate = 0
        self.lastUpgradeCheck = 0
        self.canUpgrade = False
        self.restart = False
        hive.loadLogger()
        self.log = logging.getLogger('botqueue')
        self.workers = {}
        self.workerDataAge = {}
        self.config = hive.config.get()
        self.lastScanData = None
        self.lastImageTime = time.time()
        self.quit = False

        # check for default info.
        if 'app_url' not 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. 4
0
import hashlib
import time
from bumblebee import botqueueapi
from bumblebee import hive

hive.loadLogger()
config = hive.config.get()

url = raw_input("Server URL: ")

if (url[len(url)-1] == '/'):
	url = url[:-1]

config['app_url'] = url
config['api']['authorize_url'] = url + '/app/authorize'
config['api']['endpoint_url'] = url + '/api/v1/endpoint'

consumer_key = raw_input("Consumer Key: ")
consumer_secret = raw_input("Consumer Secret: ")

config['app']['consumer_key'] = consumer_key
config['app']['consumer_secret'] = consumer_secret

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


# Save it before continuing
hive.config.save(config)
Esempio n. 5
0
 def __init__(self):
     hive.loadLogger()
     self.api = botqueueapi.BotQueueAPI()
Esempio n. 6
0
import hashlib
import time
from bumblebee import botqueueapi
from bumblebee import hive

hive.loadLogger()
config = hive.config.get()

url = raw_input("Server URL: ")

if (url[len(url) - 1] == '/'):
    url = url[:-1]

config['app_url'] = url
config['api']['authorize_url'] = url + '/app/authorize'
config['api']['endpoint_url'] = url + '/api/v1/endpoint'

consumer_key = raw_input("Consumer Key: ")
consumer_secret = raw_input("Consumer Secret: ")

config['app']['consumer_key'] = consumer_key
config['app']['consumer_secret'] = consumer_secret

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

# Save it before continuing
hive.config.save(config)

print "We're about to start the authorization process"
Esempio n. 7
0
 def __init__(self):
     hive.loadLogger()
     self.api = botqueueapi.BotQueueAPI()
     self.config = hive.config.get()