Goal: stop asking the user to run console snippets every time the import looks broken. After finalize the wizard now writes two self-contained Error Log rows that together answer "what did the wizard ask for, and what actually happened": 1. "Jey Wizard trace: amas dispatch" — written immediately when _materialize_amas_employees calls import_bulk_employees. JSON payload covers: how many employees we passed, the result dict from import_bulk_employees, parallel_module_available + bulk_ parallelism (was the worker code refactored?), full Asan Login state with import lock + session/csrf lengths, wizard cache shape (employee count, first-row keys, doc_oid presence, contract_status distribution), recent RQ Job rows for the bulk import worker. 2. "Jey Wizard trace: amas outcome" — enqueued to the long queue right after dispatch. Polls RQ for the bulk import job (up to ~90s) until finished/failed/stopped/cancelled, then writes: final RQ status + truncated exc_info, employee count in DB for the new company, AMAS Employees count, post-run Asan Login state (lock cleared? session still alive?), and the last 10 min of AMAS-tagged Error Log rows excluding our own traces. Together that's enough to localise any of the failure modes I'd otherwise investigate one-by-one (CSRF abort, expired session, stale lock, parallelism module mismatch, all-employees-filtered). The user only needs to grep `Jey Wizard trace: amas*` and paste the two rows back. |
||
|---|---|---|
| jey_wizard | ||
| .editorconfig | ||
| .eslintrc | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| CLAUDE.md | ||
| README.md | ||
| license.txt | ||
| pyproject.toml | ||
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