Example #1
0
 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()
Example #2
0
 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()
Example #3
0
 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()
Example #4
0
 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()
Example #5
0
 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()
Example #6
0
 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
Example #7
0
 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
Example #8
0
 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)
Example #9
0
 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)