Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
dcdb
dcdb
Commits
3e0cdea6
Commit
3e0cdea6
authored
Dec 15, 2018
by
Micha Mueller
Browse files
Rename error JD_INVALIDPARAMS --> JD_BADPARAMS
parent
7bfd5aab
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/include/dcdb/jobdatastore.h
View file @
3e0cdea6
...
...
@@ -68,7 +68,7 @@ namespace DCDB {
typedef
enum
{
JD_OK
,
/**< Everything went fine. */
JD_JOBIDNOTFOUND
,
/**< The given JobId was not found in the data store. */
JD_
INVALI
DPARAMS
,
/**< The provided parameters are i
nvali
d. Either
JD_
BA
DPARAMS
,
/**< The provided parameters are i
ll-forme
d. Either
because they are erroneous or incomplete. */
JD_PARSINGERROR
,
/**< Data retrieved from the data store could not be
parsed and a default value was returned instead.
...
...
lib/src/jobdatastore.cpp
View file @
3e0cdea6
...
...
@@ -95,13 +95,13 @@ void JobDataStoreImpl::prepareInsert(uint64_t ttl) {
JDError
JobDataStoreImpl
::
insertJob
(
JobData
&
jdata
)
{
/* Check if the input is valid and reasonable */
if
(
jdata
.
startTime
.
getRaw
()
==
0
||
jdata
.
endTime
.
getRaw
()
==
0
)
{
return
JD_
INVALI
DPARAMS
;
return
JD_
BA
DPARAMS
;
}
if
(
jdata
.
startTime
>=
jdata
.
endTime
)
{
return
JD_
INVALI
DPARAMS
;
return
JD_
BA
DPARAMS
;
}
if
(
jdata
.
nodes
.
size
()
==
0
)
{
return
JD_
INVALI
DPARAMS
;
return
JD_
BA
DPARAMS
;
}
JDError
error
=
JD_UNKNOWNERROR
;
...
...
@@ -217,13 +217,13 @@ JDError JobDataStoreImpl::insertSubmittedJob(JobId jid, UserId uid) {
JDError
JobDataStoreImpl
::
updateJob
(
JobData
&
jdata
)
{
/* Check if the input is valid and reasonable */
if
(
jdata
.
startTime
.
getRaw
()
==
0
||
jdata
.
endTime
.
getRaw
()
==
0
)
{
return
JD_
INVALI
DPARAMS
;
return
JD_
BA
DPARAMS
;
}
if
(
jdata
.
startTime
>=
jdata
.
endTime
)
{
return
JD_
INVALI
DPARAMS
;
return
JD_
BA
DPARAMS
;
}
if
(
jdata
.
nodes
.
size
()
==
0
)
{
return
JD_
INVALI
DPARAMS
;
return
JD_
BA
DPARAMS
;
}
JDError
error
=
JD_UNKNOWNERROR
;
...
...
@@ -411,10 +411,10 @@ JDError JobDataStoreImpl::getJobsInIntervalExcl(std::list<JobData>& jobs,
TimeStamp
intervalEnd
)
{
/* Check if the input is valid and reasonable */
if
(
intervalEnd
.
getRaw
()
==
0
)
{
return
JD_
INVALI
DPARAMS
;
return
JD_
BA
DPARAMS
;
}
if
(
intervalStart
>=
intervalEnd
)
{
return
JD_
INVALI
DPARAMS
;
return
JD_
BA
DPARAMS
;
}
JDError
error
=
JD_UNKNOWNERROR
;
...
...
@@ -518,10 +518,10 @@ JDError JobDataStoreImpl::getJobsInIntervalIncl(std::list<JobData>& jobs,
TimeStamp
intervalEnd
)
{
/* Check if the input is valid and reasonable */
if
(
intervalEnd
.
getRaw
()
==
0
)
{
return
JD_
INVALI
DPARAMS
;
return
JD_
BA
DPARAMS
;
}
if
(
intervalStart
>=
intervalEnd
)
{
return
JD_
INVALI
DPARAMS
;
return
JD_
BA
DPARAMS
;
}
JDError
error
=
JD_UNKNOWNERROR
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment