Skip to content

feat: user profile updated publish#3322

Merged
capJavert merged 2 commits intomainfrom
user-profile-updated-publish
Dec 3, 2025
Merged

feat: user profile updated publish#3322
capJavert merged 2 commits intomainfrom
user-profile-updated-publish

Conversation

@capJavert
Copy link
Copy Markdown
Contributor

@capJavert capJavert commented Dec 3, 2025

  • for gondul to receiver full profile with experiences and replace markdown

@capJavert capJavert self-assigned this Dec 3, 2025
@pulumi
Copy link
Copy Markdown

pulumi Bot commented Dec 3, 2025

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

Resource Changes

    Name                                                   Type                           Operation
~   vpc-native-private-deployment                          kubernetes:apps/v1:Deployment  update
-   vpc-native-api-db-migration-d959c590                   kubernetes:batch/v1:Job        delete
~   vpc-native-hourly-notification-cron                    kubernetes:batch/v1:CronJob    update
~   vpc-native-generate-search-invites-cron                kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-opportunities-cron             kubernetes:batch/v1:CronJob    update
-   vpc-native-api-clickhouse-migration-d959c590           kubernetes:batch/v1:Job        delete
~   vpc-native-update-highlighted-views-cron               kubernetes:batch/v1:CronJob    update
~   vpc-native-personalized-digest-deployment              kubernetes:apps/v1:Deployment  update
+   vpc-native-api-db-migration-4322cde4                   kubernetes:batch/v1:Job        create
+   vpc-native-api-clickhouse-migration-4322cde4           kubernetes:batch/v1:Job        create
~   vpc-native-temporal-deployment                         kubernetes:apps/v1:Deployment  update
~   vpc-native-update-source-public-threshold-cron         kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-users-cron                     kubernetes:batch/v1:CronJob    update
~   vpc-native-post-analytics-history-day-clickhouse-cron  kubernetes:batch/v1:CronJob    update
~   vpc-native-update-current-streak-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-check-analytics-report-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-validate-active-users-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-ws-deployment                               kubernetes:apps/v1:Deployment  update
~   vpc-native-personalized-digest-cron                    kubernetes:batch/v1:CronJob    update
+   vpc-native-user-profile-updated-sync-cron              kubernetes:batch/v1:CronJob    create
~   vpc-native-calculate-top-readers-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-generic-referral-reminder-cron              kubernetes:batch/v1:CronJob    update
~   vpc-native-update-views-cron                           kubernetes:batch/v1:CronJob    update
~   vpc-native-post-analytics-clickhouse-cron              kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-stale-user-transactions-cron          kubernetes:batch/v1:CronJob    update
~   vpc-native-sync-subscription-with-cio-cron             kubernetes:batch/v1:CronJob    update
~   vpc-native-update-tag-recommendations-cron             kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-gifted-plus-cron                      kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-user-companies-cron            kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-images-cron                    kubernetes:batch/v1:CronJob    update
~   vpc-native-bg-deployment                               kubernetes:apps/v1:Deployment  update
~   vpc-native-update-tags-str-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-update-trending-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-daily-digest-cron                           kubernetes:batch/v1:CronJob    update
~   vpc-native-update-source-tag-view-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-deployment                                  kubernetes:apps/v1:Deployment  update

Comment on lines +106 to +111
@OneToMany(
'UserExperienceSkill',
(skill: UserExperienceSkill) => skill.experience,
{ lazy: true },
)
skills: Promise<UserExperienceSkill[]>;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just moved here, skills can technically appear on other entities as well already

@capJavert capJavert force-pushed the user-profile-updated-publish branch from 4c01c88 to e925527 Compare December 3, 2025 09:55
Comment thread src/cron/userProfileUpdatedSync.ts Outdated
export const userProfileUpdatedSync: Cron = {
name: 'user-profile-updated-sync',
handler: async (con) => {
const timeThreshold = subHours(new Date(), 6);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We opted for cron because we want to deliver full user experience profile to gondul for easier parsing.

Because of users potentially changing experiences multiple times in a row it would be expensive to compute on every CDC change.

This is why we throttle and just do a once of publish every 6 hours.

Will monitor how it goes in production and adjust schedule/batching if needed. cc: @davidercruz

@capJavert capJavert marked this pull request as ready for review December 3, 2025 09:56
@capJavert capJavert requested a review from a team as a code owner December 3, 2025 09:56
Copy link
Copy Markdown
Contributor

@rebelchris rebelchris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We just have to think well with Davide how we can mitigate this, because having to wait 6 hours after CV upload before being able to do the scoring might be long?

@capJavert
Copy link
Copy Markdown
Contributor Author

@rebelchris we agreed already on this approach

@capJavert
Copy link
Copy Markdown
Contributor Author

capJavert commented Dec 3, 2025

We can also lower, I just want to see how much changes we get throughout the day.

I lowered to 3 hours for now.

@davidercruz
Copy link
Copy Markdown
Contributor

@rebelchris @capJavert let's go with 3 hours and see how it goes.

@capJavert capJavert merged commit 209c2a3 into main Dec 3, 2025
9 checks passed
@capJavert capJavert deleted the user-profile-updated-publish branch December 3, 2025 13:09
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.

3 participants