Commit 50ddcd83 authored by Martin Vala's avatar Martin Vala

Redused to rnu function for Executor

parent 95ad1c07
Pipeline #1446 passed with stage
in 15 minutes and 30 seconds
......@@ -14,6 +14,13 @@ TaskExecutor::~TaskExecutor()
/// Destructor
///
}
void * TaskExecutor::pipe() const
{
///
/// Returns pointer to pipe
///
return nullptr;
}
void TaskExecutor::taskState(TaskState * ts)
{
......@@ -29,12 +36,4 @@ TaskState * TaskExecutor::taskState() const
///
return mTaskState;
}
void * TaskExecutor::pipe() const
{
///
/// Returns pointer to pipe
///
return nullptr;
}
} // namespace Salsa
......@@ -18,21 +18,13 @@ public:
TaskExecutor();
virtual ~TaskExecutor();
/// Init
virtual bool init() = 0;
/// Assigne
virtual bool assigne(std::string, std::string) = 0;
/// Running
virtual bool run() = 0;
/// Exit
virtual bool exit() = 0;
/// Pipe
virtual void * pipe() const;
/// run
virtual bool run(std::string, std::string) = 0;
/// Handle pipe
virtual bool handlePipe(std::vector<std::string> &) = 0;
void taskState(TaskState * ts);
TaskState * taskState() const;
virtual bool handlePipe(std::vector<std::string> &) = 0;
virtual void * pipe() const;
void taskState(TaskState * ts);
TaskState * taskState() const;
protected:
TaskState * mTaskState = nullptr; ///< Task state
......
......@@ -14,35 +14,13 @@ TaskExecutorFake::~TaskExecutorFake()
/// Destructor
///
}
bool TaskExecutorFake::init()
{
///
/// Init
///
return true;
}
bool TaskExecutorFake::assigne(std::string /*worker*/, std::string /*upstream*/)
{
///
/// Assigne
///
return true;
}
bool TaskExecutorFake::run()
bool TaskExecutorFake::run(std::string /*worker*/, std::string /*upstream*/)
{
///
/// Run
///
return true;
}
bool TaskExecutorFake::exit()
{
///
/// Exit
///
return true;
}
void * TaskExecutorFake::pipe() const
{
///
......
......@@ -19,10 +19,7 @@ public:
TaskExecutorFake();
virtual ~TaskExecutorFake();
virtual bool init();
virtual bool assigne(std::string, std::string);
virtual bool run();
virtual bool exit();
virtual bool run(std::string, std::string);
virtual void * pipe() const;
};
} // namespace Salsa
......@@ -83,7 +83,7 @@ void NodeManagerZyre::runTask(TaskState * ts, std::string wk, std::string upstre
ts->task()->taskid(),
wk,
upstream);
ts->executor()->assigne(wk, upstream);
ts->executor()->run(wk, upstream);
}
bool NodeManagerZyre::handleTaskPool(void * p)
......
......@@ -18,18 +18,10 @@ TaskExecutorForkZmq::~TaskExecutorForkZmq()
if (mZactor)
zactor_destroy(&mZactor);
}
bool TaskExecutorForkZmq::init()
bool TaskExecutorForkZmq::run(std::string worker, std::string upstream)
{
///
/// Init
///
return true;
}
bool TaskExecutorForkZmq::assigne(std::string worker, std::string upstream)
{
///
/// Assigne
/// Run
///
if (mTaskState == nullptr)
......@@ -52,20 +44,6 @@ bool TaskExecutorForkZmq::assigne(std::string worker, std::string upstream)
return true;
}
bool TaskExecutorForkZmq::run()
{
///
/// Run
///
return true;
}
bool TaskExecutorForkZmq::exit()
{
///
/// Exit
///
return true;
}
void * TaskExecutorForkZmq::pipe() const
{
///
......
......@@ -20,10 +20,7 @@ public:
TaskExecutorForkZmq(zactor_t * actor = nullptr);
virtual ~TaskExecutorForkZmq();
virtual bool init();
virtual bool assigne(std::string worker, std::string upstream);
virtual bool run();
virtual bool exit();
virtual bool run(std::string worker, std::string upstream);
virtual void * pipe() const;
virtual bool handlePipe(std::vector<std::string> & extra);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment