ReviewOS

also looking at this

stacks/postline

UI polish, real queue + scheduling, Bluesky threads, live analytics, blog target

#8
Merged glennmichael123 wants to merge feat/ui-polish into main
54 files +2036 -589
app/Jobs/PublishScheduledPosts.tsadded+19-0
Changes to app/Jobs/PublishScheduledPosts.ts
@@ -0,0 +1,19 @@
1import { Job } from '@stacksjs/queue'
2import { Every } from '@stacksjs/types'
3import { postQueue } from '../Services/Social/QueueService'
4
5export default new Job({
6 name: 'PublishScheduledPosts',
7 description: 'Publish scheduled Postline posts whose time has come',
8 queue: 'default',
9 tries: 1,
10 backoff: 3,
11 rate: Every.Minute,
12
13 handle: async () => {
14 const { published, failed } = await postQueue.publishDue()
15 if (published || failed)
16 console.log(`[postline] scheduled publish run: ${published} published, ${failed} failed`)
17 return { published, failed }
18 },
19})