Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
seeker25 committed Sep 17, 2024
1 parent f04376d commit b11c8a1
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 17 deletions.
4 changes: 2 additions & 2 deletions bcol-api/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[metadata]
name = bcol_api
url = https://github.com/bcgov/sbc-pay/
author = Relationships Team
author = Pay Team
author_email =
classifiers =
Development Status :: Beta
Expand Down Expand Up @@ -45,7 +45,7 @@ per-file-ignores =
max_line_length = 120
ignore = E501
docstring-min-length=10
notes=FIXME,XXX # TODO is ignored
notes=FIXME,XXX
match_dir = src/bcol_api
ignored-modules=flask_sqlalchemy
sqlalchemy
Expand Down
1 change: 0 additions & 1 deletion bcol-api/src/bcol_api/resources/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,4 @@ class Readyz(Resource):
@staticmethod
def get():
"""Return a JSON object that identifies if the service is setupAnd ready to work."""
# TODO: add a poll to the DB when called
return {'message': 'api is ready'}, 200
4 changes: 2 additions & 2 deletions jobs/ftp-poller/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[metadata]
name = ftp_poller
url = https://github.com/bcgov/sbc-pay/
author = Relationships Team
author = Pay Team
author_email =
classifiers =
Development Status :: Beta
Expand Down Expand Up @@ -45,7 +45,7 @@ per-file-ignores =
max-line-length = 120
ignore = E501
docstring-min-length=10
notes=FIXME,XXX # TODO is ignored
notes=FIXME,XXX
match_dir = tasks
ignored-modules=flask_sqlalchemy
sqlalchemy
Expand Down
4 changes: 2 additions & 2 deletions jobs/notebook-report/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[metadata]
name = notebook_report
url = https://github.com/bcgov/sbc-pay/
author = Relationships Team
author = Pay Team
author_email =
classifiers =
Development Status :: Beta
Expand Down Expand Up @@ -45,7 +45,7 @@ per-file-ignores =
max-line-length = 120
ignore = E501
docstring-min-length=10
notes=FIXME,XXX # TODO is ignored
notes=FIXME,XXX
match_dir = tasks
ignored-modules=flask_sqlalchemy
sqlalchemy
Expand Down
2 changes: 0 additions & 2 deletions jobs/payment-jobs/services/routing_slip.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ def create_cfs_account(cfs_account: CfsAccountModel, pay_account: PaymentAccount
"""Create CFS account for routing slip."""
routing_slip: RoutingSlipModel = RoutingSlipModel.find_by_payment_account_id(pay_account.id)
try:
# TODO add status check so that LINKED etc can be skipped.
# for RS , entity/business number=party name ; RS Number=site name
cfs_account_details: Dict[str, any] = CFSService.create_cfs_account(
identifier=pay_account.name,
contact_info={},
Expand Down
3 changes: 1 addition & 2 deletions jobs/payment-jobs/tasks/cfs_create_invoice_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,9 @@ def _cancel_rs_invoices(cls):

except Exception as e: # NOQA # pylint: disable=broad-except
capture_message(
f'Error on canelling Routing Slip invoice: invoice id={invoice.id}, '
f'Error on cancelling Routing Slip invoice: invoice id={invoice.id}, '
f'routing slip : {routing_slip.id}, ERROR : {str(e)}', level='error')
current_app.logger.error(e)
# TODO stop execution ? what should be the invoice stats ; should we set it to error or retry?
continue

invoice_reference.status_code = InvoiceReferenceStatus.CANCELLED.value
Expand Down
4 changes: 2 additions & 2 deletions pay-admin/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[metadata]
name = admin
url = https://github.com/bcgov/sbc-pay/
author = Relationships Team
author = Pay Team
author_email =
classifiers =
Development Status :: Beta
Expand Down Expand Up @@ -45,7 +45,7 @@ per-file-ignores =
max_line_length = 120
ignore = E501
docstring-min-length=10
notes=FIXME,XXX # TODO is ignored
notes=FIXME,XXX
match_dir = admin
ignored-modules=flask_sqlalchemy
sqlalchemy
Expand Down
5 changes: 4 additions & 1 deletion pay-api/src/pay_api/resources/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,8 @@ def get_ops_healthz():
@bp.route('readyz')
def get_ops_readyz():
"""Return a JSON object that identifies if the service is setupAnd ready to work."""
# TODO: add a poll to the DB when called
try:
db.session.execute(SQL)
except exc.SQLAlchemyError:
return {'message': 'api is down'}, 500
return {'message': 'api is ready'}, 200
1 change: 0 additions & 1 deletion pay-api/src/pay_api/services/fee_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@ def calculate_service_fees(fee_schedule_model: FeeScheduleModel, account_fee: Ac

service_fees: float = 0

# TODO for system accounts with role EXCLUDE_SERVICE_FEES, do not charge service fees for now.
if not user.is_staff() and \
not (user.is_system() and Role.EXCLUDE_SERVICE_FEES.value in user.roles) \
and fee_schedule_model.fee.amount > 0 and fee_schedule_model.service_fee:
Expand Down
4 changes: 2 additions & 2 deletions pay-queue/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[metadata]
name = pay_queue
url = https://github.com/bcgov/sbc-pay/
author = SBC Relationships team
author = Pay Team
author_email =
classifiers =
Development Status :: Beta
Expand Down Expand Up @@ -45,7 +45,7 @@ per-file-ignores =
max_line_length = 120
ignore = E501
docstring-min-length=10
notes=FIXME,XXX # TODO is ignored
notes=FIXME,XXX
match_dir = src/pay_queue
ignored-modules=flask_sqlalchemy
sqlalchemy
Expand Down

0 comments on commit b11c8a1

Please sign in to comment.