Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
e3da2285
Commit
e3da2285
authored
3 years ago
by
Jörn Künsemöller
Browse files
Options
Downloads
Patches
Plain Diff
TMSS-159
: change reference time in MACscheduler back to scheduled_on_sky
parent
bc8d832c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!634
WIP: COBALT commissioning delta
,
!598
TMSS-159: change reference time in MACscheduler back to scheduled_on_sky
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MAC/APL/MainCU/src/MACScheduler/MACScheduler.cc
+2
-2
2 additions, 2 deletions
MAC/APL/MainCU/src/MACScheduler/MACScheduler.cc
MAC/APL/MainCU/src/MACScheduler/TMSSBridge.cc
+4
-4
4 additions, 4 deletions
MAC/APL/MainCU/src/MACScheduler/TMSSBridge.cc
with
6 additions
and
6 deletions
MAC/APL/MainCU/src/MACScheduler/MACScheduler.cc
+
2
−
2
View file @
e3da2285
...
@@ -797,7 +797,7 @@ void MACScheduler::_updatePlannedList()
...
@@ -797,7 +797,7 @@ void MACScheduler::_updatePlannedList()
if
(
!
upcomingSubTasks
.
empty
())
{
if
(
!
upcomingSubTasks
.
empty
())
{
LOG_DEBUG
(
formatString
(
"TMSSCheck:First planned observation (%s) is at %s"
,
LOG_DEBUG
(
formatString
(
"TMSSCheck:First planned observation (%s) is at %s"
,
upcomingSubTasks
[
0
][
"url"
].
asCString
(),
upcomingSubTasks
[
0
][
"scheduled_
process
_start_time"
].
asCString
()));
upcomingSubTasks
[
0
][
"url"
].
asCString
(),
upcomingSubTasks
[
0
][
"scheduled_
on_sky
_start_time"
].
asCString
()));
}
}
// make a copy of the current prepared observations (= observations shown in the navigator in the 'future'
// make a copy of the current prepared observations (= observations shown in the navigator in the 'future'
...
@@ -913,7 +913,7 @@ void MACScheduler::_updatePlannedList()
...
@@ -913,7 +913,7 @@ void MACScheduler::_updatePlannedList()
// construct name and timings info for observation
// construct name and timings info for observation
string
obsName
(
observationName
(
subtask_id
));
string
obsName
(
observationName
(
subtask_id
));
ptime
start_time
=
time_from_string
(
subtask
[
"scheduled_
process
_start_time"
].
asString
().
replace
(
10
,
1
,
" "
));
ptime
start_time
=
time_from_string
(
subtask
[
"scheduled_
on_sky
_start_time"
].
asString
().
replace
(
10
,
1
,
" "
));
ptime
modTime
=
time_from_string
(
subtask
[
"updated_at"
].
asString
().
replace
(
10
,
1
,
" "
));
ptime
modTime
=
time_from_string
(
subtask
[
"updated_at"
].
asString
().
replace
(
10
,
1
,
" "
));
// remove obs from backup of the planned-list (it is in the list again)
// remove obs from backup of the planned-list (it is in the list again)
...
...
This diff is collapsed.
Click to expand it.
MAC/APL/MainCU/src/MACScheduler/TMSSBridge.cc
+
4
−
4
View file @
e3da2285
...
@@ -83,7 +83,7 @@ Json::Value TMSSBridge::getSubTasksStartingInThreeMinutes()
...
@@ -83,7 +83,7 @@ Json::Value TMSSBridge::getSubTasksStartingInThreeMinutes()
ptime
upper_limit
=
from_time_t
(
now
+
3
*
60
);
ptime
upper_limit
=
from_time_t
(
now
+
3
*
60
);
//TODO: make exact query as in SAS/OTDB/sql/getTreeGroup_func.sql with OR'd states and exact timewindow
//TODO: make exact query as in SAS/OTDB/sql/getTreeGroup_func.sql with OR'd states and exact timewindow
string
queryStr
=
"/api/subtask/?state__value=scheduled&scheduled_
process
_start_time__gt="
+
to_iso_extended_string
(
lower_limit
)
+
"&scheduled_
process
_start_time__lt="
+
to_iso_extended_string
(
upper_limit
)
+
"&ordering=scheduled_
process
_start_time"
;
string
queryStr
=
"/api/subtask/?state__value=scheduled&scheduled_
on_sky
_start_time__gt="
+
to_iso_extended_string
(
lower_limit
)
+
"&scheduled_
on_sky
_start_time__lt="
+
to_iso_extended_string
(
upper_limit
)
+
"&ordering=scheduled_
on_sky
_start_time"
;
Json
::
Value
result
;
Json
::
Value
result
;
if
(
httpGETAsJson
(
queryStr
,
result
))
if
(
httpGETAsJson
(
queryStr
,
result
))
...
@@ -95,7 +95,7 @@ Json::Value TMSSBridge::getActiveSubTasks()
...
@@ -95,7 +95,7 @@ Json::Value TMSSBridge::getActiveSubTasks()
{
{
ptime
now
=
from_time_t
(
time
(
0
));
ptime
now
=
from_time_t
(
time
(
0
));
//TODO: make exact query as in SAS/OTDB/sql/getTreeGroup_func.sql with OR'd states and exact timewindow
//TODO: make exact query as in SAS/OTDB/sql/getTreeGroup_func.sql with OR'd states and exact timewindow
string
queryStr
=
"/api/subtask/?state__value=started&scheduled_
process
_start_time__lt="
+
to_iso_extended_string
(
now
)
+
"&scheduled_
process
_stop_time__gt="
+
to_iso_extended_string
(
now
)
+
"&ordering=scheduled_
process
_start_time"
;
string
queryStr
=
"/api/subtask/?state__value=started&scheduled_
on_sky
_start_time__lt="
+
to_iso_extended_string
(
now
)
+
"&scheduled_
on_sky
_stop_time__gt="
+
to_iso_extended_string
(
now
)
+
"&ordering=scheduled_
on_sky
_start_time"
;
Json
::
Value
result
;
Json
::
Value
result
;
if
(
httpGETAsJson
(
queryStr
,
result
))
if
(
httpGETAsJson
(
queryStr
,
result
))
...
@@ -107,7 +107,7 @@ Json::Value TMSSBridge::getFinishingSubTasks()
...
@@ -107,7 +107,7 @@ Json::Value TMSSBridge::getFinishingSubTasks()
{
{
ptime
justnow
=
from_time_t
(
time
(
0
)
-
3
*
60
);
ptime
justnow
=
from_time_t
(
time
(
0
)
-
3
*
60
);
//TODO: make exact query as in SAS/OTDB/sql/getTreeGroup_func.sql with OR'd states and exact timewindow
//TODO: make exact query as in SAS/OTDB/sql/getTreeGroup_func.sql with OR'd states and exact timewindow
string
queryStr
=
"/api/subtask/?state__value=finishing&scheduled_
process
_stop_time__gt="
+
to_iso_extended_string
(
justnow
)
+
"&ordering=scheduled_
process
_start_time"
;
string
queryStr
=
"/api/subtask/?state__value=finishing&scheduled_
on_sky
_stop_time__gt="
+
to_iso_extended_string
(
justnow
)
+
"&ordering=scheduled_
on_sky
_start_time"
;
Json
::
Value
result
;
Json
::
Value
result
;
if
(
httpGETAsJson
(
queryStr
,
result
))
if
(
httpGETAsJson
(
queryStr
,
result
))
...
@@ -161,7 +161,7 @@ std::size_t callback(const char* in,
...
@@ -161,7 +161,7 @@ std::size_t callback(const char* in,
// Need to check response status code of http (200)
// Need to check response status code of http (200)
// Inspired by https://gist.github.com/connormanning/41efa6075515019e499c
// Inspired by https://gist.github.com/connormanning/41efa6075515019e499c
// Example:
// Example:
// httpQuery("/api/subtask/?scheduled_
process
_start_time__lt=2020-03-04T12:03:00")
// httpQuery("/api/subtask/?scheduled_
on_sky
_start_time__lt=2020-03-04T12:03:00")
// results in a json string output
// results in a json string output
//
//
bool
TMSSBridge
::
httpQuery
(
const
string
&
target
,
string
&
result
,
const
string
&
query_method
,
const
string
&
data
)
bool
TMSSBridge
::
httpQuery
(
const
string
&
target
,
string
&
result
,
const
string
&
query_method
,
const
string
&
data
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment