Skip to content

Commit 65e92b6

Browse files
refactor: update processBulkRequest status titles
1 parent 85655f3 commit 65e92b6

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

packages/sdk/src/lib/dataProtectorCore/prepareBulkRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export const prepareBulkRequest = async ({
176176

177177
// Create request order for the whole bulk (only once)
178178
vOnStatusUpdate({
179-
title: 'CREATE_REQUEST_ORDER',
179+
title: 'CREATE_BULK_REQUEST',
180180
isDone: false,
181181
});
182182

@@ -204,7 +204,7 @@ export const prepareBulkRequest = async ({
204204
const requestorder = await iexec.order.signRequestorder(requestorderToSign);
205205

206206
vOnStatusUpdate({
207-
title: 'CREATE_REQUEST_ORDER',
207+
title: 'CREATE_BULK_REQUEST',
208208
isDone: true,
209209
});
210210

packages/sdk/src/lib/dataProtectorCore/processBulkRequest.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export const processBulkRequest = async <
158158
};
159159

160160
vOnStatusUpdate({
161-
title: 'MATCH_ORDERS_LOOP',
161+
title: 'CREATE_BULK_TASKS',
162162
isDone: false,
163163
payload: {
164164
remainingVolume: await getRemainingVolume(),
@@ -193,7 +193,7 @@ export const processBulkRequest = async <
193193
// If no workerpool order is available, wait and retry
194194
if (!workerpoolorder) {
195195
vOnStatusUpdate({
196-
title: 'WAITING_FOR_WORKERPOOL_ORDERS',
196+
title: 'WAIT_FOR_WORKERPOOL_AVAILABILITY',
197197
isDone: false,
198198
payload: {
199199
remainingVolume,
@@ -275,11 +275,12 @@ export const processBulkRequest = async <
275275
tasks.sort((a, b) => a.bulkIndex - b.bulkIndex);
276276

277277
vOnStatusUpdate({
278-
title: 'MATCH_ORDERS_LOOP',
278+
title: 'CREATE_BULK_TASKS',
279279
isDone: true,
280280
payload: {
281281
totalMatches: deals.length,
282282
totalVolume: volume,
283+
tasks,
283284
},
284285
});
285286

packages/sdk/src/lib/types/coreTypes.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,6 @@ export type TransferResponse = {
309309
// ---------------------ProcessProtectedData Types------------------------------------
310310
export type ProcessProtectedDataStatuses =
311311
| 'FETCH_ORDERS'
312-
| 'FETCH_PROTECTED_DATA_ORDERBOOK'
313-
| 'FETCH_APP_ORDERBOOK'
314312
| 'FETCH_WORKERPOOL_ORDERBOOK'
315313
| 'PUSH_REQUESTER_SECRET'
316314
| 'GENERATE_ENCRYPTION_KEY'
@@ -439,7 +437,7 @@ export type PrepareBulkRequestStatuses =
439437
| 'GENERATE_ENCRYPTION_KEY'
440438
| 'PUSH_ENCRYPTION_KEY'
441439
| 'PREPARE_PROTECTED_DATA_BULK'
442-
| 'CREATE_REQUEST_ORDER';
440+
| 'CREATE_BULK_REQUEST';
443441

444442
export type PrepareBulkRequestParams = {
445443
/**
@@ -536,13 +534,13 @@ export type PrepareBulkRequestResponse = {
536534

537535
export type ProcessBulkRequestStatuses =
538536
| 'FETCH_ORDERS'
539-
| 'MATCH_ORDERS_LOOP'
540-
| 'WAITING_FOR_WORKERPOOL_ORDERS'
537+
| 'CREATE_BULK_TASKS'
538+
| 'WAIT_FOR_WORKERPOOL_AVAILABILITY'
541539
| 'REQUEST_TO_PROCESS_BULK_DATA'
540+
| 'PROCESS_BULK_SLICE'
542541
| 'TASK_EXECUTION'
543542
| 'TASK_RESULT_DOWNLOAD'
544-
| 'TASK_RESULT_DECRYPT'
545-
| 'PROCESS_BULK_SLICE';
543+
| 'TASK_RESULT_DECRYPT';
546544

547545
export type ProcessBulkRequestParams = {
548546
/**

0 commit comments

Comments
 (0)