def __init__(self, message=None ): Task.__init__(self) self.mailer=getUtility(IMailer, name="mailer") self.message=message
def __init__(self, processed=0): """If processed>0 finally run indexer even if we did not found any documents. """ Task.__init__(self) config=getUtility(Interface, "configuration") keys=config["maintainance"]["keys"] keys=(k.strip() for k in keys.split(",")) if "metadata" in keys: self.max_number=config["maintainance_metadata"].get("bunch",self.__class__.default_max_number) else: self.max_number=self.__class__.default_max_number self.max_number=int(self.max_number) self.doc_ids=[] self.processed=processed
def __init__(self, doc_id): Task.__init__(self) self.doc_id=doc_id self.content=None self.headers={}