Skip to content

Commit c23c619

Browse files
committed
add dummy workflow
1 parent 8e8fb01 commit c23c619

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

services/apps/cache_worker/src/workflows.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { checkRedis } from './workflows/compute-orgs-agg/checkRedis'
12
import { computeOrgAggsAndUpdate } from './workflows/compute-orgs-agg/computeOrgAggsAndUpdate'
23
import { dailyGetAndComputeOrgAggs } from './workflows/compute-orgs-agg/getAndComputeOrgAggs'
34
import { refreshDashboardCache } from './workflows/refreshDashboardCache'
@@ -8,4 +9,5 @@ export {
89
refreshDashboardCache,
910
dailyGetAndComputeOrgAggs,
1011
computeOrgAggsAndUpdate,
12+
checkRedis,
1113
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
}

0 commit comments

Comments
 (0)