app_run_timeout,
67 const char*
const env[])
const;
69 void FinishJob(
boolfinished_ok,
intret,
155 template<
classTJob,
classTListener, const
char* const kName>
166 if(!
file.Exists()) {
169 "\" does not exists.");
175 "\" is not executable.");
179 stringidle_app_cmd =
context.GetConfig().GetString(
kName,
181 if(!idle_app_cmd.empty())
219 template<
classTFactory,
classTListener>
220 int Main(
intargc,
const char* argv[])
223unique_ptr<TFactory> factory(
newTFactory);
224unique_ptr<TListener> listener(factory->CreateListener());
225 const stringapp_name(factory->GetAppName());
Main Worker Node application.
void SetListener(IGridWorkerNodeApp_Listener *listener)
Register a listener of events of this class.
An adapter class for IGridWorkerNodeApp_Listener.
Class representing (non overlapping) integer ranges.
void OnGridWorkerStart()
Notify that CGridWorkerNode::Run() is about to be executed.
unique_ptr< CRemoteAppLauncher > TLauncherPtr
CRemoteAppBaseListener(const TLauncherPtr &launcher)
const TLauncherPtr & m_Launcher
CRemoteAppIdleTask(const string &idle_app_cmd)
void Run(CWorkerNodeIdleTaskContext &)
Do the Idle task here.
virtual IWorkerNodeIdleTask * GetIdleTask()
Get the Idle task.
virtual string GetJobVersion() const
Get the job version.
virtual string GetAppName() const
virtual IWorkerNodeJob * CreateInstance(void)
Create a job.
const IWorkerNodeInitContext * m_WorkerNodeInitContext
virtual string GetAppVersion() const
virtual void Init(const IWorkerNodeInitContext &context)
Initialize a worker node factory.
unique_ptr< CRemoteAppLauncher > m_RemoteAppLauncher
TListener * CreateListener() const
unique_ptr< IWorkerNodeIdleTask > m_IdleTask
const CNcbiEnvironment & GetLocalEnv() const
list< string > m_IncludeEnv
static bool CanExec(const CFile &file)
unique_ptr< CRemoteAppTimeoutReporter > m_TimeoutReporter
unique_ptr< CRemoteAppVersion > m_Version
const list< string > & GetIncludedEnv() const
CRemoteAppLauncher(const string &sec_name, const IRegistry &)
const list< string > & GetExcludedEnv() const
unique_ptr< CRemoteAppRemover > m_Remover
void FinishJob(bool finished_ok, int ret, CWorkerNodeJobContext &context) const
CNcbiEnvironment m_LocalEnv
bool ExecRemoteApp(const vector< string > &args, CNcbiIstream &in, CNcbiOstream &out, CNcbiOstream &err, int &exit_value, CWorkerNodeJobContext &job_context, unsigned app_run_timeout, const char *const env[]) const
string GetAppVersion(const string &) const
const string & GetAppPath() const
unique_ptr< CRanges > m_MustFailNoRetries
map< string, string, PNocase > TEnvMap
CTimeout m_MonitorRunTimeout
unique_ptr< CRemoteAppReaper > m_Reaper
const TEnvMap & GetAddedEnv() const
CTimeout m_KeepAlivePeriod
ENonZeroExitAction m_NonZeroExitAction
list< string > m_ExcludeEnv
CTimeout â Timeout interval.
Worker Node Idle Task Context.
Worker Node Idle Task Interface.
Worker Node Job Factory interface.
Worker Node Job interface.
std::ofstream out("events_result.xml")
main entry point for tests
int Main(int argc, const char *argv[])
NetSchedule worker node application.
int AppMain(int argc, const char *const *argv, const char *const *envp=0, EAppDiagStream diag=eDS_Default, const char *conf=NcbiEmptyCStr, const string &name=NcbiEmptyString)
Main function (entry point) for the NCBI application.
CDiagContext & GetDiagContext(void)
Get diag context instance.
static void SetOldPostFormat(bool value)
Set old/new format flag.
@ eDS_ToStdlog
Try standard log file (app.name + ".log") in /log/ and current directory, use stderr if both fail.
#define NCBI_THROW_FMT(exception_class, err_code, message)
The same as NCBI_THROW but with message processed as output to ostream.
const string & GetProgramVersion() const
Get program version string.
virtual CNetScheduleAPI GetNetScheduleAPI() const =0
Get the shared NetScheduleAPI object used by the worker node framework.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
Defines command line argument related classes.
Defines unified interface to application:
Defines a portable execute class.
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
NCBI C++ stream class wrappers for triggering between "new" and "old" C++ stream libraries.
std::istream & in(std::istream &in_, double &x_)
static CS_CONTEXT * context
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4