SimplifyJobs / SimplifyJobs/fastapi-gcp-tasks
Change Scheduler.delete() to return bool or raise instead of bool | Exception
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 25
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
Scheduler.delete() and AsyncScheduler.delete() currently return bool | Exception — the exception is returned as a value rather than raised, so callers can't handle failures idiomatically and type checkers can't help.
Proposal: return bool (True if deleted, False if the job didn't exist) and raise on unexpected errors, or raise a specific library exception instead of the current blanket except Exception.
This is a breaking API change, so it should land with the next breaking-version bump. Deferred from #117 to keep that PR behavior-compatible. Related TODOs already exist in fastapi_gcp_tasks/scheduler.py and async_scheduler.py.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the TODOs in fastapi_gcp_tasks/scheduler.py and async_scheduler.py and comparing both delete() implementations. Resolve the return and exception contract, including whether a specific library exception is needed, then ensure both methods follow it and that the change is scheduled for the next breaking-version bump.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100