| 22 | namespace predictor { |
| 23 | |
| 24 | int Workflow::init(const configure::Workflow& conf) { |
| 25 | const std::string& name = conf.name(); |
| 26 | _type = conf.workflow_type(); |
| 27 | _name = name; |
| 28 | if (_dag.init(conf, name) != 0) { |
| 29 | LOG(ERROR) << "Failed initialize dag: " << _name; |
| 30 | return -1; |
| 31 | } |
| 32 | return 0; |
| 33 | } |
| 34 | |
| 35 | DagView* Workflow::fetch_dag_view(const std::string& service_name, |
| 36 | const uint64_t log_id) { |