A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/grid__worker__app_8cpp_source.html below:

NCBI C++ ToolKit: src/connect/services/grid_worker_app.cpp Source File

39 #if defined(NCBI_OS_UNIX) 47

ncbi::CNcbiApplicationGuard guard = ncbi::CNcbiApplication::InstanceGuard();

48

ncbi::CGridWorkerApp* app =

dynamic_cast<

ncbi::CGridWorkerApp*

>

(guard.Get());

50

app->RequestShutdown();

67 #if defined(NCBI_OS_UNIX) 101

arg_desc->SetUsageContext(

GetArguments

().GetProgramBasename(),

112  "A TCP port number for the worker node to listen on."

,

116

arg_desc->

AddFlag

(

"daemon"

,

"Daemonize."

);

117

arg_desc->

AddFlag

(

"nodaemon"

,

"Do not daemonize."

);

121  "File to which the program log should be redirected."

,

125  "File to save the process ID and the control port number to."

,

129  "Directory populated with job inputs - one file per job."

,

132

arg_desc->

AddOptionalKey

(

"offline-output-dir"

,

"out_dir_path"

,

133  "Directory to store job outputs. Requires '-offline-input-dir'"

,

146

args[

"nodaemon"

] ?

eOff

:

149

args[

"procinfofile"

].

HasValue

() ?

150

args[

"procinfofile"

].AsString() :

kEmptyStr

);

virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)

Setup the command line argument descriptions.

virtual void Init(void)

If you override this method, do call CGridWorkerApp::Init() from inside of your overriding method.

virtual int Run(void)

Do not override this method yourself! It includes all the Worker Node specific machinery.

void Construct(IWorkerNodeJobFactory *job_factory)

CGridWorkerApp(IWorkerNodeJobFactory *job_factory, const SBuildInfo &build_info=NCBI_SBUILDINFO_DEFAULT())

CGridWorkerNode m_WorkerNode

Worker Node Job Factory interface.

void g_GridWorker_TermHandler(int)

NetSchedule worker node application.

virtual void Init(void)

Initialize the application.

virtual const CArgs & GetArgs(void) const

Get parsed command line arguments.

virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)

Setup the command line argument descriptions.

const CNcbiArguments & GetArguments(void) const

Get the application's cached unprocessed command-line arguments.

void SetVersion(const CVersionInfo &version)

Set the version number for the program.

void AddFlag(const string &name, const string &comment, CBoolEnum< EFlagValue > set_value=eFlagHasValueIfSet, TFlags flags=0)

Add description for flag argument.

void AddOptionalKey(const string &name, const string &synopsis, const string &comment, EType type, TFlags flags=0)

Add description for optional key without default value.

@ eString

An arbitrary string.

@ eOutputFile

Name of file (must be writable)

@ eInteger

Convertible into an integer number (int or Int8)

static void SetDeleteReadOnlyFiles(ESwitch on_off_default)

Specify whether read-only files can be deleted via CDirEntry::Remove() on Windows.

int Run(ESwitch daemonize=eDefault, string procinfo_file_name=string())

Start job execution loop.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

Multi-threading – mutexes; rw-locks; semaphore.

This class allows to add build info (date and tag) to application version.


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