mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-02 20:30:10 +00:00
Add job descriptions and stale-name renames
Show human-friendly per-job descriptions on the Admin Jobs page (JOB_DESCRIPTIONS) and remove the old "About Scheduled Jobs" info box. Add STALE_NAME_REWRITES and renameStaleJobNames() in SchedulerService to automatically rewrite legacy exact-literal job names (e.g. "Plex Library Scan") to neutral defaults on startup; updates are type-gated and use updateMany with exact matches so admin-customized names are not touched. Log successful renames and swallow rename errors so startup remains idempotent. Tests and documentation were updated to reflect the new UI text and to cover rename behavior.
This commit is contained in:
@@ -43,7 +43,7 @@ describe('AdminJobsPage', () => {
|
||||
{
|
||||
id: 'job-1',
|
||||
name: 'Library Scan',
|
||||
type: 'scan_plex',
|
||||
type: 'plex_library_scan',
|
||||
schedule: '0 * * * *',
|
||||
enabled: true,
|
||||
lastRun: null,
|
||||
@@ -56,6 +56,11 @@ describe('AdminJobsPage', () => {
|
||||
render(<AdminJobsPage />);
|
||||
|
||||
expect((await screen.findAllByText('Library Scan'))[0]).toBeInTheDocument();
|
||||
expect(
|
||||
(await screen.findAllByText('Scans your full media library to detect newly added audiobooks.'))[0]
|
||||
).toBeInTheDocument();
|
||||
expect(screen.queryByText('plex_library_scan')).not.toBeInTheDocument();
|
||||
expect(screen.queryByText('About Scheduled Jobs')).not.toBeInTheDocument();
|
||||
|
||||
fireEvent.click(screen.getAllByRole('button', { name: /Trigger Now/i })[0]);
|
||||
fireEvent.click(screen.getByRole('button', { name: 'Trigger Job' }));
|
||||
|
||||
Reference in New Issue
Block a user