feat: per-job enable/disable checkboxes and interval editing in scheduler#202
feat: per-job enable/disable checkboxes and interval editing in scheduler#202
Conversation
…uler UI
- Add is_job_enabled() and sync_job_state() to SchedulerManager; start()
and sync_*() methods now respect scheduler_job_disabled:{job_id} settings keys
- Add POST /scheduler/jobs/{job_id}/toggle and /set-interval routes
- _build_jobs_context now includes enabled + interval_editable flags per job,
and shows disabled jobs (not in APScheduler) when scheduler is running
- Scheduler jobs table gets a checkbox column (auto-submit on change) and
inline interval input for configurable jobs (collect_all, sq_*, pipeline_*)
- Add ContentPipelinesRepository.update_generate_interval() for targeted update
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add shutting_down check to toggle and set-interval routes (consistent with other scheduler POST routes) - Add 6 tests: invalid job_id validation, toggle enable/disable cycle, set-interval for collect_all, value clamping, disabled job page render Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@claude review. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, performance problems. Do NOT nitpick style, naming conventions, minor formatting, or subjective preferences — only flag issues that could break functionality or cause real harm in production. |
|
Claude finished @axisrow's task in 3m 4s —— View job Code Review
Overall the implementation is solid. Found a few real bugs worth fixing and one logic gap. Bug 1 — Silent no-op success for
|
…tence, fix sync cleanup - set_job_interval: return error for photo_due/photo_auto (interval not configurable) - set_job_interval: add pipeline existence check before update_generate_interval, consistent with sq branch - sync_search_query_jobs / sync_pipeline_jobs: cleanup loops now also evict jobs disabled via scheduler_job_disabled setting, not just inactive entities Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
N+1 queries in Bugs 1–3 fixed in ea31ade:
@claude review. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, performance problems. Do NOT nitpick style, naming conventions, minor formatting, or subjective preferences — only flag issues that could break functionality or cause real harm in production. |
|
Claude finished @axisrow's task in 1m 23s —— View job Code Review
All three bugs from the previous review are correctly fixed. One new issue surfaced from the interaction between Bug 1's fix and the existing Bug —
|
When collect_all is disabled its APScheduler job is removed. Calling reschedule_job on an absent job raises JobLookupError → HTTP 500. Now checks get_job() first; always updates _current_interval_minutes so the new value is applied when the job is re-enabled. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Fixed in 03e7666: @claude review. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, performance problems. Do NOT nitpick style, naming conventions, minor formatting, or subjective preferences — only flag issues that could break functionality or cause real harm in production. |
|
Claude finished @axisrow's task in 1m 21s —— View job Code Review
The fix in 03e7666 is correct. No new critical issues found. All four bugs across the review rounds have been fixed:
One observation (not blocking): PR is ready to merge. |
Summary
settingsтаблице)collect_all,sq_*,pipeline_*джобовTest plan
/scheduler, убедиться что таблица показывает колонки Вкл. / Джоб / Интервал / Следующий запускcollect_all/sq_*— значение сохраняется в БД и применяется к APSchedulerpytest tests/ -v -m "not aiosqlite_serial" -n auto🤖 Generated with Claude Code