diff --git a/jey_wizard/__init__.py b/jey_wizard/__init__.py index 8754a47..f4bd716 100644 --- a/jey_wizard/__init__.py +++ b/jey_wizard/__init__.py @@ -1 +1 @@ -__version__ = "0.1.20" +__version__ = "0.1.21" diff --git a/jey_wizard/etaxes.py b/jey_wizard/etaxes.py index 6f9e9c6..52d838b 100644 --- a/jey_wizard/etaxes.py +++ b/jey_wizard/etaxes.py @@ -1018,8 +1018,19 @@ def _materialize_amas_employees(company_name): return try: + from invoice_az import amas_api as _amas_api from invoice_az.amas_api import import_bulk_employees + # Diagnostic flag: BULK_IMPORT_PARALLELISM only exists in the post- + # refactor version that runs Phase A (ThreadPool fetch) + Phase B + # (sequential DB writes). If this is False on the test machine, the + # pulled / cached amas_api.py is still the old sequential version + # and the wizard's import will be slow even though invoice_az's + # in-app "Load from ƏMAS" appears fast (different module instance, + # different process state). + parallel_module_available = hasattr(_amas_api, "BULK_IMPORT_PARALLELISM") + bulk_parallelism = getattr(_amas_api, "BULK_IMPORT_PARALLELISM", None) + result = import_bulk_employees( asan_login_name=asan_login, employees_data=json.dumps(employees, ensure_ascii=False), @@ -1057,6 +1068,8 @@ def _materialize_amas_employees(company_name): "asan_login": asan_login, "employees": len(employees), "create_designation": create_designation, + "parallel_module_available": parallel_module_available, + "bulk_parallelism": bulk_parallelism, "result": result if isinstance(result, dict) else {"raw": str(result)}, }, ensure_ascii=False, indent=2), "Jey Wizard trace: amas enqueued", diff --git a/jey_wizard/public/js/jey_setup.js b/jey_wizard/public/js/jey_setup.js index ce192c1..2597670 100644 --- a/jey_wizard/public/js/jey_setup.js +++ b/jey_wizard/public/js/jey_setup.js @@ -10,7 +10,7 @@ frappe.provide("jey_wizard"); // Bump this string in every commit that changes wizard code. Displayed in the badge so // we can tell at a glance which version is actually running on a given machine. Kept in // sync with __version__ in jey_wizard/__init__.py. -const JEY_WIZARD_VERSION = "0.1.20"; +const JEY_WIZARD_VERSION = "0.1.21"; // Wipe Frappe + ERPNext default slides so their `before_load`/`after_load` listeners // don't try to mutate a wizard that isn't slide-based anymore.