Skip to content

Commit

Permalink
added some logging in post processor of furnishing job
Browse files Browse the repository at this point in the history
  • Loading branch information
JazzarKarim committed Aug 14, 2024
1 parent 01b2a67 commit 2581a2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,17 @@ def _update_furnishings_status(self, furnishing_group_id):
def process(self):
"""Postprocess to generate and upload file to external resources(BC Laws)."""
self._format_furnishings()
self._app.logger.debug('Formatted furnishing details presented in XML file')
self._set_meta_info()
payload = self._build_xml_data(self._xml_data)
furnishing_group, _ = self._save_xml_payload(payload)
self._app.logger.debug('Saved XML payload')
# TODO: SFTP to BC Laws

# mark furnishing records processed
self._update_furnishings_status(furnishing_group.id)
self._app.logger.debug(
f'furnishing records with group id: {furnishing_group.id} marked as processed')


class XmlMeta:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ async def _send_first_round_notification(self, batch_processing: BatchProcessing
mailing_address = business.mailing_address.one_or_none()
if mailing_address:
self._create_furnishing_address(mailing_address, new_furnishing.id)
self._app.logger.debug('Created furnishing address (first round)')
self._app.logger.debug(f'Created address (first round) with furnishing ID: {new_furnishing.id}')
if email:
# send email letter
await self._send_email(new_furnishing)
Expand Down Expand Up @@ -139,7 +139,7 @@ async def _send_second_round_notification(self, batch_processing: BatchProcessin
mailing_address = business.mailing_address.one_or_none()
if mailing_address:
self._create_furnishing_address(mailing_address, new_furnishing.id)
self._app.logger.debug('Created furnishing address (second round)')
self._app.logger.debug(f'Created address (second round) with furnishing ID: {new_furnishing.id}')

# TODO: create and add letter to either AR or transition pdf
# TODO: send AR and transition pdf to BCMail+
Expand Down

0 comments on commit 2581a2a

Please sign in to comment.