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/wn__offline__mode_8cpp_source.html below:

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

46 #define NCBI_USE_ERRCODE_X ConnServ_WorkerNode 58  const string

& output_dir_name,

67  bool

send_immediately,

bool

overwrite);

117  " requested exclusive mode while " 118  "another exclusive job is already running."

);

122  "Exclusive mode denied"

);

131  catch

(exception& e) {

133  " failed: "

<< e.what());

154  "Job was not explicitly committed"

);

179  string

input_dir_name(args[

"offline-input-dir"

].AsString());

180  string

output_dir_name;

182  if

(args[

"offline-output-dir"

])

183

output_dir_name = args[

"offline-output-dir"

].AsString();

185  CDir

input_dir(input_dir_name);

190  if

(dir_contents.get() ==

NULL

) {

191  ERR_POST

(

"Cannot read input directory '"

<< input_dir_name <<

'\''

);

199  LOG_POST

(

"Reading job input files (*.in)..."

);

202  if

(!input_dir_name.empty())

205  unsigned

job_count = 0;

210  string

name = dir_entry.

GetName

();

217  if

(dir_entry.

IsFile

()) {

225

job_context_impl->ResetJobContext();

255

job_context_impl =

NULL

;

259

}

catch

(exception& ex) {

261  if

(TWorkerNode_StopOnJobErrors::GetDefault())

274  if

(job_count == 1) {

275  LOG_POST

(

"Processed 1 job input file."

);

277  LOG_POST

(

"Processed "

<< job_count <<

" job input files."

);

Pool of recycled CCompoundID objects.

CNetScheduleAdmin::EShutdownLevel GetShutdownLevel(void)

Check if shutdown was requested.

void RequestShutdown(CNetScheduleAdmin::EShutdownLevel level)

Request node shutdown.

static CGridGlobals & GetInstance()

EShutdownLevel

Shutdown level.

@ eShutdownImmediate

Urgent shutdown was requested.

string SaveJobOutput(CNetScheduleAPI::EJobStatus job_status, const string &target_dir, CNetCacheAPI &nc_api)

void LoadJobInput(const string &source_file)

bool g_IsRequestStartEventEnabled()

NetSchedule worker node application.

virtual const CArgs & GetArgs(void) const

Get parsed command line arguments.

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

#define LOG_POST_X(err_subcode, message)

CDiagContext & GetDiagContext(void)

Get diag context instance.

void SetAppState(EDiagAppState state)

void PrintRequestStart(const string &message)

Print request start message (for request-driven applications)

void SetRequestID(TCount rid)

Set request ID.

#define ERR_POST_X(err_subcode, message)

Error posting with default error code and given error subcode.

#define ERR_POST(message)

Error posting with file, line number information but without error codes.

#define LOG_POST(message)

This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...

@ eDiagAppState_RequestBegin

RB.

@ eDiagAppState_Request

R.

TErrCode GetErrCode(void) const

Get error code.

const string & GetMsg(void) const

Get message string.

static string MakePath(const string &dir=kEmptyStr, const string &base=kEmptyStr, const string &ext=kEmptyStr)

Assemble a path from basic components.

static string AddTrailingPathSeparator(const string &path)

Add trailing path separator, if needed.

bool IsFile(EFollowLinks follow=eFollowLinks) const

Check whether a directory entry is a file.

void Reset(const string &path)

Reset path string.

string GetName(void) const

Get the base entry name with extension (if any).

TEntries * GetEntriesPtr(const string &mask=kEmptyStr, TGetEntriesFlags flags=0) const

Get directory entries based on the specified "mask".

const string & GetPath(void) const

Get entry path.

@ fIgnorePath

Return only names of entries, not their full paths.

@ fIgnoreRecursive

Suppress "self recursive" elements (the directories "." and "..").

void CommitJobWithFailure(const string &err_msg, bool no_retries=false)

Confirm that a job is finished, but an error has happened during its execution.

virtual int Do(CWorkerNodeJobContext &context)=0

Execute the job.

bool IsJobCommitted() const

const CNetScheduleJob & GetJob() const

Get the associated job structure to access all of its fields.

bool IsLogRequested() const

Check if logging was requested in config file.

void SetJobRetCode(int ret_code)

Set the return code of the job.

const string & GetJobKey() const

Get a job key.

unsigned int GetJobNumber() const

string job_id

Output job key.

ECommitStatus GetCommitStatus() const

@ eDone

Job is ready (computed successfully)

@ eFailed

Failed to run (execution timeout)

@ eExclusiveModeIsAlreadySet

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)

Check if a string ends with a specified suffix value.

bool IsEmpty(void) const

Check if the queue is empty.

void WaitForRoom(unsigned int timeout_sec=kMax_UInt, unsigned int timeout_nsec=0)

Wait for the room in the queue up to timeout_sec + timeout_nsec/1E9 seconds.

TItemHandle AcceptRequest(const TRequest &request, TUserPriority priority=0, unsigned int timeout_sec=0, unsigned int timeout_nsec=0)

Put a request in the queue with a given priority.

void SleepMilliSec(unsigned long ml_sec, EInterruptOnSignal onsignal=eRestartOnSignal)

Reader-writer based streams.

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

unique_ptr< IGridWorkerNodeApp_Listener > m_Listener

IWorkerNodeJob * GetJobProcessor()

CNetScheduleAPI m_NetScheduleAPI

void x_StartWorkerThreads()

CNcbiApplicationAPI & m_App

CStdPoolOfThreads * m_ThreadPool

void x_StopWorkerThreads()

bool IsExclusiveMode() const

size_t m_QueueEmbeddedOutputSize

void LeaveExclusiveMode()

unsigned m_ThreadPoolTimeout

CCompoundIDPool GetCompoundIDPool()

virtual CNetScheduleAdmin::EShutdownLevel GetShutdownLevel()

virtual void PutProgressMessage(const string &msg, bool send_immediately, bool overwrite)

CCompoundIDPool m_CompoundIDPool

SOfflineJobContextImpl(SGridWorkerNodeImpl *worker_node, const string &output_dir_name, CCompoundIDPool::TInstance compound_id_pool)

virtual void JobDelayExpiration(unsigned runtime_inc)

void x_PrintRequestStop()

CRef< CRequestContext > m_RequestContext

SGridWorkerNodeImpl * m_WorkerNode

CNetCacheAPI m_NetCacheAPI


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