192 bool need_to_generate,
202 size_t size_to_check = 0;
277 "input exceeds the max allowed length. "
278 "Received: " + to_string(
input.size()) +
300 eInvalidParameter,
"Invalid job key");
316 if (need_to_generate) {
337 "output exceeds the max allowed length. "
338 "Received: " + to_string(
output.size()) +
353 eInvalidParameter,
"Invalid port number");
383 list<string> statuses;
386 for (list<string>::const_iterator k = statuses.begin();
387 k != statuses.end(); ++k )
395 if (need_to_generate) {
410 "Invalid job ID in 'start_after' option key");
440 "Argument '" +
string(
key) +
"' size (" +
441 to_string(size_to_check) +
442 " bytes) exceeds the DB max limit ( " +
458 for (
const auto & aff : affs)
462 "Affinity token '" + aff +
"' length (" +
463 to_string(aff.size()) +
" bytes) exceeds the limit ( " +
476 for (
const auto &
group : groups)
480 "Group token '" +
group +
"' length (" +
481 to_string(
group.size()) +
" bytes) exceeds the limit ( " +
494 "The '" +
key +
"' " + q +
" name length (" +
495 to_string(
val.size()) +
" bytes) exceeds the limit ( " +
504 static string zero =
"0";
505 static string one =
"1";
513 key +
" parameter accepted values are 0 and 1");
522 <<
val.size() <<
"bytes) exceeds the limit "
525 const string suffix =
" TRUNCATED";
535 static string first =
"first";
536 static string last =
"last";
544 "The order parameter valid values are 'first' and 'last'");
555 list<string> field_names;
557 for (
const auto & field_name : field_names) {
562 <<
" is not supported. Ignore and continue.");
564 fields |= it->second;
NetSchedule internal exception.
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
void SetSessionID(const string &session)
static CRequestContext & GetRequestContext(void)
Shortcut to CDiagContextThreadData::GetThreadData().GetRequestContext()
void SetHitID(const string &hit)
Set explicit hit id. The id is reset on request end.
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
void Warning(CExceptionArgs_Base &args)
string queue
Queue name, optional.
static EJobStatus StringToStatus(const CTempString &status_str)
Parse status string into enumerator value.
void GetPeerAddress(unsigned int *host, unsigned short *port, ENH_ByteOrder byte_order) const
Get peer address.
@ eSAF_IP
only numeric IP if INET socket, empty otherwise
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static string ParseEscapes(const CTempString str, EEscSeqRange mode=eEscSeqRange_Standard, char user_char='?')
Parse C-style escape sequences in the specified string.
static unsigned int StringToUInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to unsigned int.
@ fConvErr_NoThrow
Do not throw an exception on error.
const struct ncbi::grid::netcache::search::fields::KEY key
NetSchedule client specs.
const unsigned int kNetScheduleMaxDBDataSize
const unsigned int kNetScheduleMaxDBErrSize
static string s_MskOption
static string s_ProgressMsgOption
static string s_AlertOption
static string s_NeedStolenOption
static string s_PortOption
static string s_QClassOption
static string s_DrainOption
static string s_StartAfterOption
static string s_SidOption
static string s_AuthTokenOption
static string s_AffinityMayChangeOption
static string s_UserOption
static string s_EffectiveOption
static string s_JobReturnCodeOption
static string s_NcbiPhidOption
static string s_CountOption
static string s_VersionOption
static string s_FieldsOption
static string s_GroupOption
static string s_CommentOption
static string s_JobKeyOption
static string s_ErrMsgOption
static string s_GroupMayChangeOption
static string s_ModeOption
static string s_AnyAffOption
static string s_AddOption
static string s_PullbackOption
static string s_WnodeAffOption
static string s_DescriptionOption
static string s_OrderOption
static string s_DelOption
static string s_ReaderAffOption
static string s_NoRetriesOption
static string s_OutputOption
static string s_OptionOption
static string s_InputOption
static string s_ScopeOption
static string s_AffOption
static string s_StatusOption
static string s_QNameOption
static string s_BlacklistOption
static string s_ExclusiveNewAffOption
static string s_ServiceOption
static map< string, EDumpFields > ks_DumpFields
static string s_DataOption
static string s_TimeoutOption
static string s_PrioritizedAffOption
static string s_NeedProgressMsgOption
@ eListenerNotifExpiration
@ eNeedSubmitProgressMsgNotif
@ eNeedListenerProgressMsgNotif
const unsigned kNetScheduleMaxOverflowSize
const unsigned kMaxQueueNameSize
Defines CRequestContext class for NCBI C++ diagnostic API.
Meaningful information encoded in the NetSchedule key.
bool x_GetOrderFirst(const string &val)
string job_statuses_string
vector< TJobStatus > job_statuses
void AssignValues(TNSProtoParams ¶ms, const string &command, bool need_to_generate, CSocket &peer_socket, CCompoundIDPool::TInstance id_pool)
string x_NormalizeErrorMessage(const string &val)
TDumpFields x_GetDumpFields(const string &val)
unsigned int start_after_job_id
string queue_from_job_key
void x_CheckGroupList(const string &val)
bool x_GetBooleanValue(const string &val, const string &key)
void x_CheckQueueName(const string &val, const string &key)
void x_CheckAffinityList(const string &val)