diff --git a/apps/fyle/tasks.py b/apps/fyle/tasks.py index b551da9d..39d952de 100644 --- a/apps/fyle/tasks.py +++ b/apps/fyle/tasks.py @@ -251,6 +251,7 @@ def import_and_export_expenses(report_id: str, org_id: str) -> None: :param org_id: org id :return: None """ + logger.info('Import and export expenses report_id: %s, org_id: %s', report_id, org_id) workspace = Workspace.objects.get(fyle_org_id=org_id) fyle_credentials = FyleCredential.objects.get(workspace_id=workspace.id) expense_group_settings = ExpenseGroupSettings.objects.get(workspace_id=workspace.id) @@ -278,6 +279,7 @@ def import_and_export_expenses(report_id: str, org_id: str) -> None: expense_group_ids = [expense_group['id'] for expense_group in expense_groups] if len(expense_group_ids): + logger.info('Exporting to Netsuite(Direct Export Trigger) workspace_id: %s, expense_group_ids: %s', workspace.id, expense_group_ids) export_to_netsuite(workspace.id, None, expense_group_ids) except Configuration.DoesNotExist: diff --git a/apps/netsuite/queue.py b/apps/netsuite/queue.py index 73c1e3fe..4ece49fb 100644 --- a/apps/netsuite/queue.py +++ b/apps/netsuite/queue.py @@ -29,6 +29,7 @@ def __create_chain_and_run(fyle_credentials: FyleCredential, in_progress_expense chain.append('apps.fyle.helpers.sync_dimensions', fyle_credentials, True) for task in chain_tasks: + logger.info('Chain task %s, Chain Expense Group %s, Chain Task Log %s', task['target'], task['expense_group'], task['task_log_id']) chain.append(task['target'], task['expense_group'], task['task_log_id'], task['last_export']) chain.append('apps.fyle.tasks.post_accounting_export_summary', fyle_credentials.workspace.fyle_org_id, workspace_id, fund_source) @@ -43,6 +44,7 @@ def schedule_bills_creation(workspace_id: int, expense_group_ids: List[str], is_ :return: None """ if expense_group_ids: + logger.info('Preparing to queue expense groups %s of fund source %s for Bill', expense_group_ids, fund_source) expense_groups = ExpenseGroup.objects.filter( Q(tasklog__id__isnull=True) | ~Q(tasklog__status__in=['IN_PROGRESS', 'COMPLETE']), workspace_id=workspace_id, id__in=expense_group_ids, bill__id__isnull=True, exported_at__isnull=True @@ -92,6 +94,7 @@ def schedule_credit_card_charge_creation(workspace_id: int, expense_group_ids: L :return: None """ if expense_group_ids: + logger.info('Preparing to queue expense groups %s of fund source %s for Credit Card Charge', expense_group_ids, fund_source) expense_groups = ExpenseGroup.objects.filter( Q(tasklog__id__isnull=True) | ~Q(tasklog__status__in=['IN_PROGRESS', 'COMPLETE']), workspace_id=workspace_id, id__in=expense_group_ids, @@ -148,6 +151,7 @@ def schedule_expense_reports_creation(workspace_id: int, expense_group_ids: List :return: None """ if expense_group_ids: + logger.info('Preparing to queue expense groups %s of fund source %s for Expense Report', expense_group_ids, fund_source) expense_groups = ExpenseGroup.objects.filter( Q(tasklog__id__isnull=True) | ~Q(tasklog__status__in=['IN_PROGRESS', 'COMPLETE']), workspace_id=workspace_id, id__in=expense_group_ids, @@ -199,6 +203,7 @@ def schedule_journal_entry_creation(workspace_id: int, expense_group_ids: List[s :return: None """ if expense_group_ids: + logger.info('Preparing to queue expense groups %s of fund source %s Journal Entry', expense_group_ids, fund_source) expense_groups = ExpenseGroup.objects.filter( Q(tasklog__id__isnull=True) | ~Q(tasklog__status__in=['IN_PROGRESS', 'COMPLETE']), workspace_id=workspace_id, id__in=expense_group_ids, journalentry__id__isnull=True, exported_at__isnull=True