Skip to content

feat(posts): support scheduling all post types#3975

Open
idoshamun wants to merge 1 commit into
mainfrom
codex/schedule-all-post-types
Open

feat(posts): support scheduling all post types#3975
idoshamun wants to merge 1 commit into
mainfrom
codex/schedule-all-post-types

Conversation

@idoshamun

@idoshamun idoshamun commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary:

  • Add scheduledAt support to one-source sharePost, submitExternalLink, and createPollPost flows.
  • Reuse existing scheduled-post flags/Temporal publish flow while keeping moderation and createPostInMultipleSources scheduling unsupported.
  • List all scheduled post types in scheduledPosts and add regression coverage for share, external link, poll, scheduled listing, and content-update workers preserving scheduled shares.
  • Guard postUpdated worker visibility updates so scheduled posts/shares are not published before Temporal.

Validation:

  • pnpm exec prettier --write src/common/post.ts src/entity/posts/utils.ts src/schema/posts.ts src/entity/SourcePostModeration.ts tests/posts.ts src/workers/postUpdated/shared.ts tests/workers/postUpdated.ts
  • NODE_ENV=test npx jest tests/posts.ts --testEnvironment=node --runInBand -t "should throw error when content exceeds maximum length|should return link preview and image being the placeholder when empty|should return an error if content exceeds 20000 characters|should schedule shared post|should create invisible share and still return mutation result|should schedule createPollPost|should schedule external link share|should list scheduled posts"
  • NODE_ENV=test npx jest tests/workers/postUpdated.ts --testEnvironment=node --runInBand -t "should update all the post related shared posts to visible|should not update scheduled shared posts to visible"
  • pnpm run build
  • pnpm run lint

@pulumi

pulumi Bot commented Jul 3, 2026

Copy link
Copy Markdown

🍹 The Update (preview) for dailydotdev/api/prod (at ec0301c) was successful.

Resource Changes

    Name                                                       Type                           Operation
+   vpc-native-api-db-migration-1c3d2237                       kubernetes:batch/v1:Job        create
~   vpc-native-calculate-top-readers-cron                      kubernetes:batch/v1:CronJob    update
-   vpc-native-api-clickhouse-migration-fcab9478               kubernetes:batch/v1:Job        delete
~   vpc-native-ws-deployment                                   kubernetes:apps/v1:Deployment  update
~   vpc-native-clean-old-notifications-cron                    kubernetes:batch/v1:CronJob    update
~   vpc-native-squad-posts-analytics-refresh-cron              kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-gifted-plus-cron                          kubernetes:batch/v1:CronJob    update
~   vpc-native-temporal-deployment                             kubernetes:apps/v1:Deployment  update
~   vpc-native-user-posts-analytics-refresh-cron               kubernetes:batch/v1:CronJob    update
~   vpc-native-daily-digest-cron                               kubernetes:batch/v1:CronJob    update
~   vpc-native-materialize-monthly-best-post-archives-cron     kubernetes:batch/v1:CronJob    update
~   vpc-native-update-views-cron                               kubernetes:batch/v1:CronJob    update
~   vpc-native-post-lifecycle-state-clickhouse-cron            kubernetes:batch/v1:CronJob    update
~   vpc-native-personalized-digest-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-channel-digests-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-update-source-public-threshold-cron             kubernetes:batch/v1:CronJob    update
~   vpc-native-rotate-daily-quests-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-subscription-anniversary-achievements-cron      kubernetes:batch/v1:CronJob    update
~   vpc-native-deployment                                      kubernetes:apps/v1:Deployment  update
~   vpc-native-channel-highlights-cron                         kubernetes:batch/v1:CronJob    update
~   vpc-native-user-profile-analytics-history-clickhouse-cron  kubernetes:batch/v1:CronJob    update
-   vpc-native-api-db-migration-fcab9478                       kubernetes:batch/v1:Job        delete
~   vpc-native-check-analytics-report-cron                     kubernetes:batch/v1:CronJob    update
~   vpc-native-update-trending-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-update-tags-str-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-user-profile-analytics-clickhouse-cron          kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-opportunities-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-generate-search-invites-cron                    kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-images-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-personalized-digest-deployment                  kubernetes:apps/v1:Deployment  update
~   vpc-native-sync-subscription-with-cio-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-post-analytics-history-day-clickhouse-cron      kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-channel-highlights-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-private-deployment                              kubernetes:apps/v1:Deployment  update
~   vpc-native-rotate-weekly-quests-cron                       kubernetes:batch/v1:CronJob    update
~   vpc-native-hourly-notification-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-post-analytics-achievements-cron                kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-expired-better-auth-sessions-cron         kubernetes:batch/v1:CronJob    update
~   vpc-native-expire-super-agent-trial-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-generic-referral-reminder-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-user-profile-updated-sync-cron                  kubernetes:batch/v1:CronJob    update
... and 15 other changes

@idoshamun idoshamun force-pushed the codex/schedule-all-post-types branch 2 times, most recently from 4c4437d to b4e3a0f Compare July 3, 2026 11:00
@idoshamun idoshamun force-pushed the codex/schedule-all-post-types branch from b4e3a0f to ec0301c Compare July 3, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant