Skip to content

Commit

Permalink
disable organizationUpdate workflow on org update, mv_activities_cube…
Browse files Browse the repository at this point in the history
… refresh
  • Loading branch information
epipav committed Aug 12, 2024
1 parent 1a1010c commit e331860
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/src/bin/jobs/refreshMaterializedViewsForCube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const job: CrowdJob = {

const materializedViews = [
'mv_members_cube',
'mv_activities_cube',
// 'mv_activities_cube',
'mv_organizations_cube',
'mv_segments_cube',
]
Expand Down
7 changes: 5 additions & 2 deletions backend/src/services/organizationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import {
MergeActionType,
OrganizationIdentityType,
SyncMode,
TemporalWorkflowId,
// TemporalWorkflowId,
} from '@crowd/types'
import { randomUUID } from 'crypto'
import lodash from 'lodash'
import { findOrgAttributes, upsertOrgIdentities } from '@crowd/data-access-layer/src/organizations'
import { WorkflowIdReusePolicy } from '@crowd/temporal'
// import { WorkflowIdReusePolicy } from '@crowd/temporal'
import getObjectWithoutKey from '@/utils/getObjectWithoutKey'
import { IActiveOrganizationFilter } from '@/database/repositories/types/organizationTypes'
import MemberOrganizationRepository from '@/database/repositories/memberOrganizationRepository'
Expand Down Expand Up @@ -911,6 +911,8 @@ export default class OrganizationService extends LoggerBase {
)

await SequelizeRepository.commitTransaction(tx)

/*
await this.options.temporal.workflow.start('organizationUpdate', {
taskQueue: 'profiles',
workflowId: `${TemporalWorkflowId.ORGANIZATION_UPDATE}/${this.options.currentTenant.id}/${id}`,
Expand All @@ -930,6 +932,7 @@ export default class OrganizationService extends LoggerBase {
TenantId: [this.options.currentTenant.id],
},
})
*/

return record
} catch (error) {
Expand Down

0 comments on commit e331860

Please sign in to comment.