def to_dict(self): data = Document.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}) return data