def __init__(self, name, category, options, uris=[], torrent=None, metafile=None): self.name = name self.status = Task._DEFAULT_STATUS self.uris = uris self.torrent = torrent self.metafile = metafile self.options = options self.category = category LoggingMixin.__init__(self) self.logger.info('Adding new task: {}...'.format(self)) self.logger.debug('Task options: {}'.format(options)) SQLSession.add(self) SQLSession.commit() self._init()
def __init__(self, name, directory, pool): self.name = name self.directory = directory self.pool = pool SQLSession.add(self) SQLSession.commit() self._init()
def __init__(self, name, host, user='', passwd='', port='6800', is_local=False): self.name = name self.user = user self.passwd = passwd self.host = host self.port = port self.is_local = is_local SQLSession.add(self) SQLSession.commit() self._init()