joque
task orchestration library
exec_visitor.hpp
Go to the documentation of this file.
1 #pragma once
23 
24 #include "dag.hpp"
25 #include "records.hpp"
26 
27 namespace joque
28 {
29 
33 {
34 public:
36  virtual void after_node_enque( const dag_node& )
37  {
38  }
39 
41  virtual void on_detected_cycle( std::span< const dag_node* > )
42  {
43  }
44 
46  virtual void after_job_is_inval( const dag_node&, std::string_view )
47  {
48  }
49 
51  virtual void after_dep_inval( const dag_node&, const dag_node& )
52  {
53  }
54 
56  virtual void before_run( const exec_record&, const dag_node& )
57  {
58  }
59 
61  virtual void on_run_log( const dag_node&, std::string_view )
62  {
63  }
64 
68  virtual void after_run( const exec_record&, const run_record* /*rec*/, const dag_node& )
69  {
70  }
71 
72  virtual void on_tick( const exec_record& )
73  {
74  }
75 
77  virtual void after_execution( const exec_record& )
78  {
79  }
80 
81  virtual ~exec_visitor() = default;
82 };
83 
84 } // namespace joque
Definition: dag.hpp:97
Execution visitor interface, used by execution.
Definition: exec_visitor.hpp:33
virtual void after_job_is_inval(const dag_node &, std::string_view)
Run after check whenever job was invalidated.
Definition: exec_visitor.hpp:46
virtual void after_node_enque(const dag_node &)
Run after node is enqued.
Definition: exec_visitor.hpp:36
virtual void before_run(const exec_record &, const dag_node &)
Executed once execution starts for the node.
Definition: exec_visitor.hpp:56
virtual void on_run_log(const dag_node &, std::string_view)
Run after job finished execution.
Definition: exec_visitor.hpp:61
virtual void on_detected_cycle(std::span< const dag_node * >)
Ran in case cycle is detected.
Definition: exec_visitor.hpp:41
virtual void on_tick(const exec_record &)
Definition: exec_visitor.hpp:72
virtual ~exec_visitor()=default
virtual void after_run(const exec_record &, const run_record *, const dag_node &)
Executed after execution of node.
Definition: exec_visitor.hpp:68
virtual void after_execution(const exec_record &)
Run after execution finished.
Definition: exec_visitor.hpp:77
virtual void after_dep_inval(const dag_node &, const dag_node &)
Run after node became invalidated because of other node.
Definition: exec_visitor.hpp:51
MIT License.
Definition: dag.hpp:27
Record of execution of entire task set.
Definition: records.hpp:90
Record storing information about a run of one task, produced during single execution once for each ta...
Definition: records.hpp:55