0xironclad / 0xironclad/Task-Scheduler-API
GET /tasks/upcoming
- 主要言語
- TypeScript
- スター
- 0
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Expose an endpoint that returns tasks scheduled to run soon, based on a future time window.
What to implement:
New route: GET /tasks/upcoming
Query params:
window (minutes, default 60)
limit, offset (optional)
Return tasks where:
status = 'pending' & run_at is between NOW() and NOW() + interval 'window minutes'
Order results by run_at ascending.
About the window parameter
window defines how far into the future to look.
Example:
GET /tasks/upcoming?window=30 , This returns pending tasks scheduled in the next 30 minutes.
DB logic:
Select tasks where:
status = 'pending'
run_at is between NOW() and NOW() + interval 'window minutes'
Order by run_at ascending
Expected result
A filtered, chronological array of upcoming tasks.
Empty array if nothing is scheduled in the window.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
コードベース内の既存のタスクルートを探します。おそらく routes/ または controllers/ ディレクトリにあります。新しい GET /tasks/upcoming エンドポイントをそこに追加し、記述されたフィルター(status='pending'、run_at がウィンドウ内)で tasks テーブルをクエリする必要があります。他のエンドポイントがクエリパラメータとデータベースクエリをどのように処理しているかを確認し、プロジェクトのパターンに従ってください。サーバーを実行し、異なる window 値でエンドポイントを呼び出してテストします。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- express, nodejs, postgresql, typescript
- 領域
- api, backend
- issue の種類
- 機能追加
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 70/100