3434#include < nlohmann/json.hpp>
3535
3636// Qserv headers
37+ #include " global/intTypes.h"
3738#include " mysql/MySqlConfig.h"
38- #include " qmeta/types.h"
3939#include " util/ConfigStore.h"
4040#include " util/ConfigValMap.h"
4141
@@ -177,6 +177,9 @@ class CzarConfig {
177177 // / the method then the monitoring will be disabled.
178178 unsigned int czarStatsUpdateIvalSec () const { return _czarStatsUpdateIvalSec->getVal (); }
179179
180+ // / Maximum number of attempts to run a given job before aborting the entire user query.
181+ unsigned int jobMaxAttempts () const { return _jobMaxAttempts->getVal (); }
182+
180183 // / A worker is considered fully ALIVE if the last update from the worker has been
181184 // / heard in less than _activeWorkerTimeoutAliveSecs seconds.
182185 int getActiveWorkerTimeoutAliveSecs () const { return _activeWorkerTimeoutAliveSecs->getVal (); }
@@ -230,14 +233,14 @@ class CzarConfig {
230233 std::string const & name () const { return _czarName; }
231234
232235 // / @return The unique identifier of Czar.
233- qmeta:: CzarId id () const { return _czarId; }
236+ CzarId id () const { return _czarId; }
234237
235238 // / Set a unique identifier of Czar.
236239 // / @note In the current implementation of Qserv a value of the identifier is not
237240 // / available at a time when the configuration is initialized. The identifier is generated
238241 // / when registering Czar by name in a special table of teh Qserv database.
239242 // / This logic should be fixed in some future version of Qserv.
240- void setId (qmeta:: CzarId id);
243+ void setId (CzarId id);
241244
242245 // / @return The interval in seconds for cleaning up the in-progress queries in QMeta.
243246 unsigned int getInProgressCleanupIvalSec () const { return _inProgressCleanupIvalSec->getVal (); }
@@ -266,8 +269,7 @@ class CzarConfig {
266269 // / The unique identifier of the Czar instance, the real vale cannot be
267270 // / acquired until later. Using a crazy initial value in hopes of highlighting
268271 // / issues.
269- // / TODO: Is this really the right place for this? (previously undefined)
270- qmeta::CzarId _czarId = std::numeric_limits<qmeta::CzarId>::max();
272+ CzarId _czarId = std::numeric_limits<CzarId>::max();
271273
272274 nlohmann::json _jsonConfig; // /< JSON-ified configuration
273275
@@ -370,7 +372,6 @@ class CzarConfig {
370372 // UberJobs
371373 CVTIntPtr _uberJobMaxChunks =
372374 util::ConfigValTInt::create (_configValMap, " uberjob" , " maxChunks" , notReq, 10000 );
373-
374375 CVTIntPtr _qMetaSecsBetweenChunkCompletionUpdates = util::ConfigValTInt::create(
375376 _configValMap, " tuning" , " qMetaSecsBetweenChunkCompletionUpdates" , notReq, 60 );
376377 CVTIntPtr _interactiveChunkLimit =
@@ -383,6 +384,8 @@ class CzarConfig {
383384 util::ConfigValTBool::create (_configValMap, " tuning" , " notifyWorkersOnCzarRestart" , notReq, 1 );
384385 CVTIntPtr _czarStatsUpdateIvalSec =
385386 util::ConfigValTInt::create (_configValMap, " tuning" , " czarStatsUpdateIvalSec" , notReq, 1 );
387+ CVTUIntPtr _jobMaxAttempts =
388+ util::ConfigValTUInt::create (_configValMap, " tuning" , " jobMaxAttempts" , notReq, 5 );
386389
387390 // Replicator
388391 CVTStrPtr _replicationInstanceId =
0 commit comments