def redownload_protocol(self): if self.committee.type == 'plenum': from plenum.management.commands.parse_plenum_protocols_subcommands.download import download_for_existing_meeting download_for_existing_meeting(self) else: from simple.management.commands.syncdata import Command as SyncdataCommand self.protocol_text = SyncdataCommand().get_committee_protocol_text(self.src_url) self.save()
def redownload_protocol(self): if self.committee.type == 'plenum': from plenum.management.commands.parse_plenum_protocols_subcommands.download import download_for_existing_meeting download_for_existing_meeting(self) else: from simple.management.commands.syncdata import Command as SyncdataCommand self.protocol_text = SyncdataCommand().get_committee_protocol_text( self.src_url) self.save()
def redownload_protocol(self): if self.committee.type == 'plenum': # TODO: Using managment command this way is an antipattern, a common service should be extracted and used from plenum.management.commands.parse_plenum_protocols_subcommands.download import \ download_for_existing_meeting download_for_existing_meeting(self) else: with KnessetDataCommitteeMeetingProtocol.get_from_url(self.src_url) as protocol: self.protocol_text = protocol.text self.protocol_text_update_date = datetime.now() self.save()
def redownload_protocol(self): if self.committee.type == 'plenum': # TODO: Using managment command this way is an antipattern, a common service should be extracted and used from plenum.management.commands.parse_plenum_protocols_subcommands.download import \ download_for_existing_meeting download_for_existing_meeting(self) else: # TODO: see above from simple.management.commands.syncdata import Command as SyncdataCommand self.protocol_text = SyncdataCommand().get_committee_protocol_text(self.src_url) self.save()
def redownload_protocol(self): if self.committee.type == 'plenum': # TODO: Using managment command this way is an antipattern, a common service should be extracted and used from plenum.management.commands.parse_plenum_protocols_subcommands.download import \ download_for_existing_meeting download_for_existing_meeting(self) else: # TODO: see above from simple.management.commands.syncdata import Command as SyncdataCommand self.protocol_text = SyncdataCommand().get_committee_protocol_text( self.src_url) self.save()
def redownload_protocol(self): if self.committee.type == 'plenum': # TODO: Using managment command this way is an antipattern, a common service should be extracted and used from plenum.management.commands.parse_plenum_protocols_subcommands.download import \ download_for_existing_meeting download_for_existing_meeting(self) else: try: with KnessetDataCommitteeMeetingProtocol.get_from_url( self.src_url) as protocol: self.protocol_text = protocol.text self.protocol_text_update_date = datetime.now() self.save() except AntiwordException as e: logger.error(e.message, exc_info=True, extra={'output': e.output}) raise e
def redownload_protocol(self): if self.committee.type == 'plenum': # TODO: Using managment command this way is an antipattern, a common service should be extracted and used from plenum.management.commands.parse_plenum_protocols_subcommands.download import \ download_for_existing_meeting download_for_existing_meeting(self) else: try: with KnessetDataCommitteeMeetingProtocol.get_from_url(self.src_url) as protocol: self.protocol_text = protocol.text self.protocol_text_update_date = datetime.now() self.save() except AntiwordException, e: logger.error( e.message, exc_info=True, extra={ 'output': e.output } ) raise e
def redownload_plenum_protocol(self): """utility method to redownload plenum meeting protocol""" from plenum.management.commands.parse_plenum_protocols_subcommands.download import download_for_existing_meeting download_for_existing_meeting(self)
def redownload_plenum_protocol(self): """utility method to redownload plenum meeting protocol""" from plenum.management.commands.parse_plenum_protocols_subcommands.download import download_for_existing_meeting download_for_existing_meeting(self)