Skip to content

Commit

Permalink
fix: fix bulk job
Browse files Browse the repository at this point in the history
  • Loading branch information
btrn11 committed Jan 16, 2025
1 parent 8c7eb5c commit 21c761a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/package/packagePushUpgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,16 @@ export class PackagePushUpgrade {
body: JSON.stringify(packagePushRequestBody),
});

// Create PackagePushJob for each org using Bulk API v2
const job = connection.bulk2.createJob({ object: 'PackagePushJob', operation: 'insert' });

await job.open();

const pushJobs = orgList.map((orgId) => ({
PackagePushRequestId: pushRequestResult.id,
SubscriberOrganizationKey: orgId,
}));

// Create PackagePushJob for each org using Bulk API v2
const job = connection.bulk2.createJob({ operation: 'insert', object: 'PackagePushJob' });

await job.open();

await job.uploadData(pushJobs);
await job.close();
await job.poll();
Expand Down

0 comments on commit 21c761a

Please sign in to comment.