def to_dict(self): data = CrawlerState.crawler_stats(self.get_id()) data.update({ 'collection': self.collection, 'collection_id': self.COLLECTION_ID, 'collection_label': self.COLLECTION_LABEL or self.COLLECTION_ID, 'name': self.CRAWLER_NAME, 'schedule': self.SCHEDULE, 'id': self.get_id() }) return data
def to_dict(self): data = CrawlerState.crawler_stats(self.get_id()) data.update({ 'collection': self.collection, 'collection_id': self.COLLECTION_ID, 'collection_label': self.COLLECTION_LABEL or self.COLLECTION_ID, 'name': self.CRAWLER_NAME, 'schedule': self.SCHEDULE, 'id': self.get_id() }) return data
def to_dict(self): data = CrawlerState.crawler_stats(self.get_id()) data.update({ 'source': self.source, 'source_id': self.SOURCE_ID, 'source_label': self.SOURCE_LABEL or self.SOURCE_ID, 'name': self.CRAWLER_NAME, 'schedule': self.SCHEDULE, 'id': self.get_id() }) return data
def to_dict(self): data = CrawlerState.crawler_stats(self.get_id()) data.update({"name": self.CRAWLER_NAME, "schedule": self.SCHEDULE, "id": self.get_id()}) if self.COLLECTION_ID: data.update({"collection": self.collection, "collection_id": self.COLLECTION_ID}) return data