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

NCBI C++ ToolKit: src/sample/app/netschedule/netschedule_node_sample.cpp Source File

55  virtual void Init

(

void

);

56  virtual int Run

(

void

);

71

arg_desc->SetUsageContext(

GetArguments

().GetProgramBasename(),

74

arg_desc->AddPositional(

"service"

,

75  "NetSchedule service name"

,

77

arg_desc->AddPositional(

"queue"

,

78  "NetSchedule queue name (like: noname)."

,

89  const string

& service = args[

"service"

].AsString();

90  const string

& queue_name = args[

"queue"

].AsString();

95  int

no_jobs_counter = 0;

96  unsigned

jobs_done = 0;

99  bool

first_try =

true

;

126

job_exists = executor.

GetJob

(job, 560);

129

cout <<

"\nProcessing."

<< endl;

130

node_status = 0; first_try =

false

;

132  if

(node_status != 0) {

133

cout <<

"\nProcessing."

<< endl;

137  string

expected_input =

"Hello "

+ queue_name;

138  if

(expected_input != job.

input

) {

142  if

(jobs_processed.

find

(job.

job_id

) != jobs_processed.

end

()) {

144

<<

" has already been processed."

);

151

job.

output

=

"DONE "

+ queue_name;

157  if

(jobs_done % 50 == 0) {

158

cout <<

"*"

<< flush;

163

cout <<

"\nWaiting."

<< endl;

164

node_status = 1; first_try =

false

;

166  if

(node_status != 1) {

167

cout <<

"\nWaiting."

<< endl;

170  if

(++no_jobs_counter > 7) {

171

cout <<

"\nNo new jobs arriving. Processing closed."

<< endl;

177

cout << endl <<

"Jobs done: "

<< jobs_processed.

size

() << endl;

Client API for NCBI NetSchedule server.

Smart pointer to a part of the NetSchedule API that does job retrieval and processing on the worker n...

virtual int Run(void)

Run the application.

virtual void Init(void)

Initialize the application.

iterator_bool insert(const value_type &val)

const_iterator find(const key_type &key) const

const_iterator end() const

virtual const CArgs & GetArgs(void) const

Get parsed command line arguments.

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.

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.

@ eString

An arbitrary string.

void SetDiagPostFlag(EDiagPostFlag flag)

Set the specified flag (globally).

EDiagSev SetDiagPostLevel(EDiagSev post_sev=eDiag_Error)

Set the threshold severity for posting the messages.

#define ERR_POST(message)

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

@ eDPF_Trace

Default flags to use when tracing.

@ eDiag_Info

Informational message.

string output

Job result data.

void PutResult(const CNetScheduleJob &job)

Put job result (job should be received by GetJob() or WaitJob())

bool GetJob(CNetScheduleJob &job, const string &affinity_list=kEmptyStr, CDeadline *dealine=NULL)

Get a pending job.

CNetScheduleExecutor GetExecutor()

Create an instance of CNetScheduleExecutor.

string job_id

Output job key.

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

Defines the CNcbiApplication and CAppException classes for creating NCBI applications.

Defines command line argument related classes.

Defines unified interface to application:

Miscellaneous common-use basic types and functionality.

Process information in the NCBI Registry, including working with configuration files.

NetSchedule client specs.

int NcbiSys_main(int argc, ncbi::TXChar *argv[])


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