Skip to content

Commit cc9352b

Browse files
committed
fix
1 parent 645f344 commit cc9352b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

services/apps/script_executor_worker/src/workflows/syncOrganizations.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { IndexedEntityType } from '@crowd/opensearch/src/repo/indexing.data'
44

55
import * as entityIndexActivities from '../activities/sync/entity-index'
66
import * as orgSyncActivities from '../activities/sync/organization'
7-
import { svc } from '../main'
87
import { ISyncArgs } from '../types'
98

109
const orgSyncActivity = proxyActivities<typeof orgSyncActivities>({
@@ -23,13 +22,13 @@ export async function syncOrganizations(args: ISyncArgs): Promise<void> {
2322

2423
if (args.clean) {
2524
await entityIndexActivity.deleteIndexedEntities(IndexedEntityType.ORGANIZATION)
26-
svc.log.info('Deleted indexed entities for organizations!')
25+
console.log('Deleted indexed entities for organizations!')
2726
}
2827

2928
const organizationIds = await orgSyncActivity.getOrganizationsForSync(BATCH_SIZE)
3029

3130
if (organizationIds.length === 0) {
32-
svc.log.info('No more organizations to sync!')
31+
console.log('No more organizations to sync!')
3332
return
3433
}
3534

@@ -42,7 +41,7 @@ export async function syncOrganizations(args: ISyncArgs): Promise<void> {
4241

4342
const diffInSeconds = (new Date().getTime() - batchStartTime.getTime()) / 1000
4443

45-
svc.log.info(
44+
console.log(
4645
`Synced ${organizationCount} organizations! Speed: ${Math.round(
4746
organizationCount / diffInSeconds,
4847
)} organizations/second!`,
@@ -51,7 +50,7 @@ export async function syncOrganizations(args: ISyncArgs): Promise<void> {
5150
await entityIndexActivity.markEntitiesIndexed(IndexedEntityType.ORGANIZATION, organizationIds)
5251

5352
if (args.testRun) {
54-
svc.log.info('Test run completed - stopping after first batch!')
53+
console.log('Test run completed - stopping after first batch!')
5554
return
5655
}
5756

0 commit comments

Comments
 (0)