Skip to content

Commit e6105b8

Browse files
committed
chore: remove deprecated affiliation handling functions and workflows
1 parent 14f5721 commit e6105b8

File tree

7 files changed

+1
-214
lines changed

7 files changed

+1
-214
lines changed

services/apps/profiles_worker/src/activities.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@ import {
33
calculateAllMemberLeafAggregates,
44
calculateAllOrganizationLeafAggregates,
55
} from './activities/calculateLeafSegmentAggregates'
6-
import {
7-
getAffiliationsLastCheckedAt,
8-
getLLMResult,
9-
getMemberIdsForAffiliationUpdates,
10-
updateAffiliationsLastCheckedAt,
11-
} from './activities/common'
6+
import { getLLMResult } from './activities/common'
127
import {
138
createMemberBotSuggestion,
149
createMemberNoBot,
@@ -45,9 +40,6 @@ import {
4540

4641
export {
4742
updateMemberAffiliations,
48-
getAffiliationsLastCheckedAt,
49-
getMemberIdsForAffiliationUpdates,
50-
updateAffiliationsLastCheckedAt,
5143
syncMember,
5244
syncOrganization,
5345
findMembersInOrganization,

services/apps/profiles_worker/src/activities/common.ts

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,9 @@
11
import { LlmService } from '@crowd/common_services'
22
import { pgpQx } from '@crowd/data-access-layer'
3-
import {
4-
getAffiliationsLastCheckedAt as getAffiliationsLastCheckedAtDAL,
5-
getAllMemberIdsPaginated,
6-
getMemberIdsWithRecentRoleChanges,
7-
updateAffiliationsLastCheckedAt as updateAffiliationsLastCheckedAtOfTenant,
8-
} from '@crowd/data-access-layer/src/old/apps/profiles_worker'
93
import { ILlmResponse, LlmQueryType } from '@crowd/types'
104

115
import { svc } from '../main'
126

13-
export async function getAffiliationsLastCheckedAt(): Promise<string> {
14-
return getAffiliationsLastCheckedAtDAL(svc.postgres.writer)
15-
}
16-
17-
export async function getMemberIdsForAffiliationUpdates(
18-
affiliationsLastChecked: string,
19-
limit: number,
20-
offset: number,
21-
): Promise<string[]> {
22-
if (!affiliationsLastChecked) {
23-
return getAllMemberIdsPaginated(svc.postgres.writer, limit, offset)
24-
}
25-
26-
return getMemberIdsWithRecentRoleChanges(
27-
svc.postgres.writer,
28-
affiliationsLastChecked,
29-
limit,
30-
offset,
31-
)
32-
}
33-
34-
export async function updateAffiliationsLastCheckedAt(): Promise<void> {
35-
await updateAffiliationsLastCheckedAtOfTenant(svc.postgres.writer)
36-
}
37-
387
export async function getLLMResult(
398
queryType: LlmQueryType,
409
prompt: string,

services/apps/profiles_worker/src/types/member.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ export interface MemberUpdateInput {
88
syncToOpensearch?: boolean
99
}
1010

11-
export interface IRecalculateAffiliationsForNewRolesInput {
12-
offset?: number
13-
}
14-
1511
export interface ProcessMemberBotSuggestionWithLLMInput {
1612
memberId: string
1713
}

services/apps/profiles_worker/src/workflows.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { calculateProjectGroupMemberAggregates } from './workflows/member/calcul
44
import { calculateProjectMemberAggregates } from './workflows/member/calculateProjectMemberAggregates'
55
import { memberUpdate } from './workflows/member/memberUpdate'
66
import { processMemberBotAnalysisWithLLM } from './workflows/member/processMemberBotAnalysisWithLLM'
7-
import { recalculateAffiliationsForNewRoles } from './workflows/member/recalculateAffiliationsForNewRoles'
87
import { refreshMemberDisplayAggregates } from './workflows/member/refreshMemberDisplayAggregates'
98
import { calculateProjectGroupOrganizationAggregates } from './workflows/organization/calculateProjectGroupOrganizationAggregates'
109
import { calculateProjectOrganizationAggregates } from './workflows/organization/calculateProjectOrganizationAggregates'
@@ -14,7 +13,6 @@ import { refreshOrganizationDisplayAggregates } from './workflows/organization/r
1413
export {
1514
memberUpdate,
1615
organizationUpdate,
17-
recalculateAffiliationsForNewRoles,
1816
refreshMemberDisplayAggregates,
1917
refreshOrganizationDisplayAggregates,
2018
processMemberBotAnalysisWithLLM,

services/apps/profiles_worker/src/workflows/member/recalculateAffiliationsForNewRoles.ts

Lines changed: 0 additions & 80 deletions
This file was deleted.

services/libs/data-access-layer/src/old/apps/profiles_worker/index.ts

Lines changed: 0 additions & 81 deletions
This file was deleted.

services/libs/data-access-layer/src/old/apps/profiles_worker/types.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)