ProjectTech4DevAI / ProjectTech4DevAI/kaapi-backend
Classification : Implement cron job to update status of jobs/batch
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 18
- Forks
- 10
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 14
Description
Problem
Both the Fine-Tuning API and the Batch API in OpenAI run asynchronously. Once a request is created, the job continues processing on OpenAI’s side, and the status only updates when the job progresses (e.g., queued → running → succeeded/failed).
Currently, to know whether a fine-tuning job or batch job has completed, the user must manually call the Retrieve API for each object. This manual polling is tedious, inefficient, and not scalable.
Proposed Solution
-
Set up a cron job (or background worker) that:
-
Periodically calls the Retrieve API for both fine-tuning and batch jobs.
-
Updates the database with the latest job status and results.
-
Ensures that when users query the database, they receive up-to-date information without needing to manually poll OpenAI endpoints.
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 with the Fine-Tuning API and Batch API Retrieve API entry points described in the issue, then trace how job status and results are stored in the database. Define the periodic worker behavior for both job types, including status updates and retrieved results. Done means database queries expose current information without manual polling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend, database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100