sec_delay,
50 unsigned intnanosec_delay,
51 const bool& logging) :
54m_CleaningLogging(logging),
55m_SecDelay(sec_delay),
56m_NanosecDelay(nanosec_delay),
57m_StopSignal(0, 10000000)
101.Print(
"_type",
"job_cleaner_thread");
113 catch(exception & ex) {
115 ERR_POST(
"Error while cleaning queue: "<< ex.what() <<
116 " Cleaning thread has been stopped.");
118 ctx->SetRequestStatus(
123 ERR_POST(
"Unknown error while cleaning queue. " 124 "Cleaning thread has been stopped.");
126 ctx->SetRequestStatus(
141 unsigned intsec_delay,
142 unsigned intnanosec_delay,
143 const bool& logging) :
146m_ExecutionLogging(logging),
147m_SecDelay(sec_delay),
148m_NanosecDelay(nanosec_delay),
149m_StopSignal(0, 10000000)
191 ctx->SetRequestID();
194.Print(
"_type",
"job_execution_watcher_thread");
202 catch(exception & ex) {
204 ERR_POST(
"Error in execution watcher: "<< ex.what() <<
205 " watcher thread has been stopped.");
207 ctx->SetRequestStatus(
212 ERR_POST(
"Unknown error in execution watcher. " 213 "Watched thread has been stopped.");
215 ctx->SetRequestStatus(
virtual bool ShouldRun()=0
const bool & m_CleaningLogging
CJobQueueCleanerThread(CBackgroundHost &host, CQueueDataBase &qdb, unsigned int sec_delay, unsigned int nanosec_delay, const bool &logging)
CQueueDataBase & m_QueueDB
virtual void * Main(void)
Derived (user-created) class must provide a real thread function.
~CJobQueueCleanerThread()
CAtomicCounter_WithAutoInit m_StopFlag
unsigned int m_NanosecDelay
CAtomicCounter_WithAutoInit m_StopFlag
~CJobQueueExecutionWatcherThread()
CJobQueueExecutionWatcherThread(CBackgroundHost &host, CQueueDataBase &qdb, unsigned int sec_delay, unsigned int nanosec_delay, const bool &logging)
const bool & m_ExecutionLogging
virtual void * Main(void)
Derived (user-created) class must provide a real thread function.
CQueueDataBase & m_QueueDB
unsigned int m_NanosecDelay
@ eStatus_OK
Command is ok and execution is good.
@ eStatus_ServerError
Internal server error.
void PurgeClientRegistry(void)
void PurgeAffinities(void)
void PurgeBlacklistedJobs(void)
void CheckExecutionTimeout(bool logging)
TValue Add(int delta) THROWS_NONE
Atomically add value (=delta), and return new counter value.
TValue Get(void) const THROWS_NONE
Get atomic counter value.
void PrintRequestStop(void)
Print request stop message (for request-driven applications)
CDiagContext & GetDiagContext(void)
Get diag context instance.
static void SetRequestContext(CRequestContext *ctx)
Shortcut to CDiagContextThreadData::GetThreadData().SetRequestContext()
void PrintRequestStart(const string &message)
Print request start message (for request-driven applications)
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static void SetCurrentThreadName(const CTempString &)
Set name for the current thread.
bool TryWait(unsigned int timeout_sec=0, unsigned int timeout_nsec=0)
Timed wait.
void Post(unsigned int count=1)
Increment the semaphore by "count".
Defines CRequestContext class for NCBI C++ diagnostic API.
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