Commit 6bb0618
refactor: Use
Replace manual `_raise_if_not_initialized()` calls with the `ensure_context`
decorator from Crawlee, matching the pattern already used in ChargingManager.
- Add `active` attribute to `_ActorType` (replaces `_is_initialized`)
- Decorate all public methods with `@ensure_context` instead of calling
`_raise_if_not_initialized()` at the start of each method
- Remove the now-unused `_raise_if_not_initialized` method
- Update all test references from `_is_initialized` to `active`
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>ensure_context decorator in Actor class1 parent 75e4c04 commit 6bb0618
File tree
6 files changed
+54
-73
lines changed- src/apify
- tests
- e2e
- integration
- unit
- actor
6 files changed
+54
-73
lines changed
0 commit comments