Skip to content

Commit

Permalink
Add loggers for accounting export summary
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwin1111 committed Oct 10, 2023
1 parent 5db7efe commit 67cacf9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/fyle/actions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from datetime import datetime, timezone
from typing import List
import logging

from django.conf import settings
from django.db.models import Q
Expand All @@ -16,6 +17,10 @@
from .helpers import get_updated_accounting_export_summary


logger = logging.getLogger(__name__)
logger.level = logging.INFO


def get_expense_group_ids(workspace_id: int):
configuration = WorkspaceGeneralSettings.objects.get(workspace_id=workspace_id)
fund_source = []
Expand Down Expand Up @@ -164,6 +169,7 @@ def mark_accounting_export_summary_as_synced(expenses: List[Expense]) -> None:
for expense in expenses:
expense.accounting_export_summary['synced'] = True
updated_accounting_export_summary = expense.accounting_export_summary
logger.info('updated_accounting_export_summary - %s', updated_accounting_export_summary)
expense_to_be_updated.append(
Expense(
id=expense.id,
Expand Down
1 change: 1 addition & 0 deletions apps/fyle/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def post_accounting_export_summary(org_id: str, workspace_id: int) -> None:

if payload:
try:
logger.info('Accounting Export Summary Payload Workspace ID - %s - Payload - %s', workspace_id, payload)
bulk_post_accounting_export_summary(platform, payload)
mark_accounting_export_summary_as_synced(paginated_expenses)
except RetryException:
Expand Down

0 comments on commit 67cacf9

Please sign in to comment.