Skip to content

Commit

Permalink
Ran linter.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-gale committed Apr 15, 2020
1 parent 4064a2d commit a15bed0
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 24 deletions.
7 changes: 5 additions & 2 deletions src/store/factory/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,15 +279,18 @@ export function* buildRequestWorkflowSaga(
const updateActivityAction = (yield take(
updateActivity.type
)) as PayloadAction<Activity>;
if (updateActivityAction.payload.id === currentExecutingActivity.id && updateActivityAction.payload.completed)
if (
updateActivityAction.payload.id === currentExecutingActivity.id &&
updateActivityAction.payload.completed
)
break;
}

// Get next activity or break, if we have reached the end.
if (!currentExecutingActivity.nextActivity) break;
currentExecutingActivity = currentExecutingActivity.nextActivity;
}

// Onced completed remove the active build request (Or move to a completed state / section).
console.log(`Completed workflow ${computedWorkflow.id}`);
}
Expand Down
24 changes: 12 additions & 12 deletions src/store/factory/services/fffprinter/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,19 @@ function* executeActivityWorkflow(
const serviceProvider = action.payload.serviceProvider as FFFPrinter;
const activity = action.payload.activity as TransmutationActivity;

// Started timestamp.
activity.started = new Date();
// Started timestamp.
activity.started = new Date();

// Interact with virtual market and exchange the factory liquid asset for the material fixed asset to add to worshop.
// Somehow assign the material fixed asset to this active activity / build request?
console.log(
`FFF printer service ${serviceProvider.id} starting to execute transmutation activity ${activity.id}`
);
yield delay(1000);
// Completed timestamp and update.
activity.completed = new Date();
yield put(updateActivity(activity));
// Interact with virtual market and exchange the factory liquid asset for the material fixed asset to add to worshop.
// Somehow assign the material fixed asset to this active activity / build request?
console.log(
`FFF printer service ${serviceProvider.id} starting to execute transmutation activity ${activity.id}`
);
yield delay(1000);

// Completed timestamp and update.
activity.completed = new Date();
yield put(updateActivity(activity));
}

export function* watchRequestFufillmentOfActivitySaga() {
Expand Down
20 changes: 10 additions & 10 deletions src/store/factory/services/humanworker/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,17 @@ function* executeTransmutationActivity(
humanWorker: HumanWorker,
transmutationActivity: TransmutationActivity
) {
// Started timestamp.
transmutationActivity.started = new Date();
// Started timestamp.
transmutationActivity.started = new Date();

console.log(
`Human worker service ${humanWorker.id} starting to execute transmutation activity ${transmutationActivity.id}`
);
yield delay(1000);

console.log(
`Human worker service ${humanWorker.id} starting to execute transmutation activity ${transmutationActivity.id}`
);
yield delay(1000);

// Completed timestamp and update.
transmutationActivity.completed = new Date();
yield put(updateActivity(transmutationActivity));
// Completed timestamp and update.
transmutationActivity.completed = new Date();
yield put(updateActivity(transmutationActivity));
}

function* executeActivityWorkflow(
Expand Down

0 comments on commit a15bed0

Please sign in to comment.