SimplifyJobs / SimplifyJobs/fastapi-gcp-tasks

Change Scheduler.delete() to return bool or raise instead of bool | Exception

Open
#119 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.