Skip to content

Commit

Permalink
Add createPubTaskFromSnapshotTask factory method
Browse files Browse the repository at this point in the history
to PubTaskManager
  • Loading branch information
WMXPY committed Nov 7, 2023
1 parent 6c066ae commit 0e2dee6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/task/task-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { PubSnapshot } from "../snapshot/snapshot";
import { PubTaskBase } from "./task-base";
import { createTaskSnapshot } from "./snapshot/create-snapshot";
import { PubCachedWorkflowConfiguration } from "../workflow/cache/configuration";
import { createPubTaskFromSnapshotTask } from "./factory/from-snapshot-task";

export class PubTaskManager {

Expand All @@ -26,9 +27,11 @@ export class PubTaskManager {
): PubTaskManager {

const tasks: PubTaskBase[] = snapshot.tasks.map((taskSnapshot) => {
return PubTaskBase.fromSnapshot(taskSnapshot, workflowConfiguration);
return createPubTaskFromSnapshotTask(
taskSnapshot,
workflowConfiguration,
);
});

return new PubTaskManager(tasks, workflowConfiguration);
}

Expand Down

0 comments on commit 0e2dee6

Please sign in to comment.