File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
services/apps/cache_worker/src
workflows/compute-orgs-agg Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ import { checkRedis } from './workflows/compute-orgs-agg/checkRedis'
12import { computeOrgAggsAndUpdate } from './workflows/compute-orgs-agg/computeOrgAggsAndUpdate'
23import { dailyGetAndComputeOrgAggs } from './workflows/compute-orgs-agg/getAndComputeOrgAggs'
34import { refreshDashboardCache } from './workflows/refreshDashboardCache'
89 refreshDashboardCache ,
910 dailyGetAndComputeOrgAggs ,
1011 computeOrgAggsAndUpdate ,
12+ checkRedis ,
1113}
Original file line number Diff line number Diff line change 1+ import { proxyActivities } from '@temporalio/workflow'
2+
3+ import * as activities from '../../activities/computeAggs/organization'
4+
5+ const activity = proxyActivities < typeof activities > ( { startToCloseTimeout : '15 minutes' } )
6+
7+ /*
8+ dailyGetAndComputeOrgAggs is a Temporal workflow that:
9+ - [Activity]: Get organization IDs from Redis.
10+ - [Child Workflow]: Re-compute and update aggregates for each organization
11+ in batches of 50. Child workflows run independently and won't be
12+ cancelled if the parent workflow stops.
13+ */
14+ export async function checkRedis ( ) : Promise < void > {
15+ const { cursor, organizationIds } = await activity . getOrgIdsFromRedis ( )
16+
17+ console . log ( 'cursor' , cursor )
18+ console . log ( 'organizationIds' , organizationIds )
19+ }
You can’t perform that action at this time.
0 commit comments