Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
atdb-ldv
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
ASTRON SDC
atdb-ldv
Commits
ccbab5fa
Commit
ccbab5fa
authored
3 years ago
by
Roy de Goei
Browse files
Options
Downloads
Patches
Plain Diff
SDC-470: Fixes after local testing
parent
3afca2ba
No related branches found
No related tags found
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
atdb/atdb/settings/dev.py
+1
-1
1 addition, 1 deletion
atdb/atdb/settings/dev.py
atdb/taskdatabase/services/algorithms.py
+5
-3
5 additions, 3 deletions
atdb/taskdatabase/services/algorithms.py
with
6 additions
and
4 deletions
atdb/atdb/settings/dev.py
+
1
−
1
View file @
ccbab5fa
...
@@ -15,7 +15,7 @@ DATABASES = {
...
@@ -15,7 +15,7 @@ DATABASES = {
'
PASSWORD
'
:
'
atdb123
'
,
'
PASSWORD
'
:
'
atdb123
'
,
'
NAME
'
:
'
atdb_ldv
'
,
'
NAME
'
:
'
atdb_ldv
'
,
'
HOST
'
:
'
localhost
'
,
'
HOST
'
:
'
localhost
'
,
'
PORT
'
:
''
,
'
PORT
'
:
'
5432
'
,
},
},
}
}
...
...
This diff is collapsed.
Click to expand it.
atdb/taskdatabase/services/algorithms.py
+
5
−
3
View file @
ccbab5fa
...
@@ -52,12 +52,14 @@ def get_min_start_and_max_end_time(sas_id):
...
@@ -52,12 +52,14 @@ def get_min_start_and_max_end_time(sas_id):
min_start_time
=
None
min_start_time
=
None
max_end_time
=
None
max_end_time
=
None
logger
.
info
(
"
get_min_start_and_max_end_time(
"
+
str
(
sas_id
)
+
"
)
"
)
logger
.
info
(
"
get_min_start_and_max_end_time(
"
+
str
(
sas_id
)
+
"
)
"
)
tasks
=
Task
.
objects
.
filter
(
sas_id
=
sas_id
).
filter
(
status
=
'
archived
'
)
+
Task
.
objects
.
filter
(
sas_id
=
sas_id
).
filter
(
status
=
'
finished
'
)
tasks
=
Task
.
objects
.
filter
(
sas_id
=
sas_id
).
filter
(
Q
(
status
=
'
archived
'
)
|
Q
(
status
=
'
finished
'
)
)
for
task
in
tasks
:
for
task
in
tasks
:
# If more entrees are found for 'processing' task, get the latest
# If more entrees are found for 'processing' task, get the latest
start_time
=
LogEntry
.
objects
.
filter
(
task
=
task
.
pk
).
filter
(
step_name
=
'
running
'
).
filter
(
status
=
'
processing
'
).
lastest
(
'
timestamp
'
).
timestamp
latest_start_time
=
LogEntry
.
objects
.
filter
(
task
=
task
.
pk
).
filter
(
step_name
=
'
running
'
).
filter
(
status
=
'
processing
'
).
latest
(
'
timestamp
'
)
start_time
=
latest_start_time
.
timestamp
# If more entrees are found for 'processed' task, get the latest
# If more entrees are found for 'processed' task, get the latest
end_time
=
LogEntry
.
objects
.
filter
(
task
=
task
.
pk
).
filter
(
step_name
=
'
running
'
).
filter
(
status
=
'
processed
'
).
lastest
(
'
timestamp
'
).
timestamp
lastest_end_time
=
LogEntry
.
objects
.
filter
(
task
=
task
.
pk
).
filter
(
step_name
=
'
running
'
).
filter
(
status
=
'
processed
'
).
latest
(
'
timestamp
'
)
end_time
=
lastest_end_time
.
timestamp
if
min_start_time
is
None
:
if
min_start_time
is
None
:
min_start_time
=
start_time
min_start_time
=
start_time
elif
start_time
<
min_start_time
:
elif
start_time
<
min_start_time
:
...
...
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