Changeset 834bcc3 in Klonkt for src/services/Scheduler.js
- Timestamp:
- 06/23/2026 06:14:27 PM (3 months ago)
- Branches:
- main
- Children:
- d774679
- Parents:
- bb42dfb
- File:
-
- 1 edited
-
src/services/Scheduler.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/services/Scheduler.js
rbb42dfb r834bcc3 1 1 /** 2 * Scheduler — release -planning (premium #3).2 * Scheduler — release planning (premium #3). 3 3 * 4 * Geplande posts hebben status 'scheduled' + publish_at (toekomst). Een lichte5 * timer zet ze op 'published' zodra publish_at bereikt is. Zo hoeven de publieke6 * queries (status='published') NIET aangepast te worden — een geplande post is7 * gewoon nog niet 'published' en dus nergens publiek zichtbaar tot het moment.4 * Scheduled posts have status 'scheduled' + publish_at (future). A lightweight 5 * timer flips them to 'published' once publish_at is reached. This means public 6 * queries (status='published') need NO changes — a scheduled post simply isn't 7 * 'published' yet and therefore invisible until that moment. 8 8 */ 9 9 … … 25 25 for (const p of due) { 26 26 upd.run(p.id); 27 try { fts.run(HtmlSanitizerService.toPlainText(p.content || ''), p.title || '', p.username || '', p.id); } catch { /* FTS niet-fataal */ }27 try { fts.run(HtmlSanitizerService.toPlainText(p.content || ''), p.title || '', p.username || '', p.id); } catch { /* FTS failure is non-fatal */ } 28 28 } 29 29 return due.length; … … 33 33 let _timer = null; 34 34 export function startScheduler() { 35 flipScheduledPosts(); // direct bijboot35 flipScheduledPosts(); // run immediately on boot 36 36 if (_timer) return; 37 _timer = setInterval(flipScheduledPosts, 60 * 1000); // e lke minuut37 _timer = setInterval(flipScheduledPosts, 60 * 1000); // every minute 38 38 if (_timer.unref) _timer.unref(); 39 39 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)