1 #ifndef CONNECT_SERVICES___GRID_GLOBALS__HPP
2 #define CONNECT_SERVICES___GRID_GLOBALS__HPP
60 {
return (
unsigned) m_ActiveJobs.size(); }
63 { m_MaxJobsAllowed = max_jobs_allowed; }
65 { m_MaxFailuresAllowed = max_failures_allowed; }
67 { m_InfiniteLoopTime = infinite_loop_time; }
70 void CheckForInfiniteLoop();
112 unsigned int GetNewJobNumber();
117 void SetUDPPort(
unsigned short udp_port) {m_UDPPort = udp_port;}
122 m_ShutdownLevel = level;
123 InterruptUDPPortListening();
128 m_ShutdownLevel = level;
129 m_ExitCode = exit_code;
130 InterruptUDPPortListening();
132 bool IsShuttingDown();
137 {
return m_ShutdownLevel; }
148 void InterruptUDPPortListening();
CAtomicCounter_WithAutoInit –.
CGridGlobals(const CGridGlobals &)
void RequestShutdown(CNetScheduleAdmin::EShutdownLevel level, int exit_code)
void SetWorker(SGridWorkerNodeImpl *worker)
CNetScheduleAdmin::EShutdownLevel GetShutdownLevel(void)
Check if shutdown was requested.
CGridGlobals & operator=(const CGridGlobals &)
CAtomicCounter_WithAutoInit m_JobsStarted
void SetUDPPort(unsigned short udp_port)
void SetExitCode(int exit_code)
void RequestShutdown(CNetScheduleAdmin::EShutdownLevel level)
Request node shutdown.
void SetReuseJobObject(bool value)
SGridWorkerNodeImpl * m_Worker
volatile CNetScheduleAdmin::EShutdownLevel m_ShutdownLevel
unique_ptr< CWNJobWatcher > m_JobWatcher
const CTime & GetStartTime() const
bool ReuseJobObject() const
EShutdownLevel
Shutdown level.
@ eNoShutdown
No Shutdown was requested.
CWNJobWatcher & operator=(const CWNJobWatcher &)
map< CWorkerNodeJobContext *, SJobActivity > TActiveJobs
void SetInfiniteLoopTime(unsigned int infinite_loop_time)
unsigned int m_JobsStarted
void SetMaxFailuresAllowed(unsigned int max_failures_allowed)
unsigned int m_MaxFailuresAllowed
unsigned int m_InfiniteLoopTime
unsigned int m_JobsFailed
CWNJobWatcher(const CWNJobWatcher &)
unsigned int m_JobsRescheduled
unsigned int m_JobsSucceeded
unsigned int m_JobsCanceled
unsigned int m_JobsReturned
unsigned GetJobsRunningNumber() const
unsigned int m_MaxJobsAllowed
void SetMaxJobsAllowed(unsigned int max_jobs_allowed)
void Print(const CCompactSAMApplication::AlignInfo &ai)
virtual void Notify(const CWorkerNodeJobContext &job, EEvent event)=0
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
#define NCBI_XCONNECT_EXPORT
Miscellaneous common-use basic types and functionality.
NetSchedule client specs.
SJobActivity(CStopWatch et, bool is)