Go to file
Ali 29f277a7bf Trace whether amas_api worker module has the parallel import code
Reported symptom: ƏMAS employees imported via the wizard appear to
trickle in one-by-one (old sequential _process_bulk_employees_import),
while invoice_az's in-app "Load from ƏMAS" button finishes the same
volume in seconds via the new ThreadPoolExecutor Phase A + sequential
Phase B path.

The wizard and the in-app flow both call invoice_az.amas_api.
import_bulk_employees, which frappe.enqueue's the work to a Frappe
RQ worker. Same code on disk, same enqueue, same worker queue — so
there's no place left where the wizard could pick a different code
path. The remaining plausible explanations are out-of-band:
  - parallel changes never committed/pushed to the test machine
  - workers running with stale imports because only `bench restart
    web` (or only the supervisor web group) ran, not the workers

Add `parallel_module_available` (truthy iff invoice_az.amas_api
exposes the BULK_IMPORT_PARALLELISM constant added in the parallel
refactor) and the constant value itself to the existing
"Jey Wizard trace: amas enqueued" Error Log entry. After the next
finalize on the test machine, that line will say either
  parallel_module_available: true,  bulk_parallelism: 10
or
  parallel_module_available: false, bulk_parallelism: null
which is enough to tell the source-of-truth from the in-process
state without rerunning anything.
2026-05-01 15:58:54 +00:00
jey_wizard Trace whether amas_api worker module has the parallel import code 2026-05-01 15:58:54 +00:00
.editorconfig feat: Initialize App 2026-04-22 10:00:16 +00:00
.eslintrc feat: Initialize App 2026-04-22 10:00:16 +00:00
.gitignore feat: Initialize App 2026-04-22 10:00:16 +00:00
.pre-commit-config.yaml feat: Initialize App 2026-04-22 10:00:16 +00:00
CLAUDE.md Add FIFO/Moving Average picker; add CLAUDE.md 2026-04-24 13:01:18 +00:00
README.md feat: Initialize App 2026-04-22 10:00:16 +00:00
license.txt feat: Initialize App 2026-04-22 10:00:16 +00:00
pyproject.toml feat: Initialize App 2026-04-22 10:00:16 +00:00

README.md

Jey Wizard

Jey Wizard

Installation

You can install this app using the bench CLI:

cd $PATH_TO_YOUR_BENCH
bench get-app $URL_OF_THIS_REPO --branch main
bench install-app jey_wizard

Contributing

This app uses pre-commit for code formatting and linting. Please install pre-commit and enable it for this repository:

cd apps/jey_wizard
pre-commit install

Pre-commit is configured to use the following tools for checking and formatting your code:

  • ruff
  • eslint
  • prettier
  • pyupgrade

License

unlicense