Skip to content
GitLab
Explore
Sign in
Register
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
fefced91
Commit
fefced91
authored
11 months ago
by
Nico Vermaas
Browse files
Options
Downloads
Patches
Plain Diff
add service filter for logentry
parent
1ce2cf8b
No related branches found
Branches containing commit
No related tags found
1 merge request
!350
SDC-1313 ancillary dataproducts to dcache (ATDB side)
Pipeline
#78503
passed
11 months ago
Stage: test
Stage: build
Stage: deploy_to_test
Stage: deploy_to_production
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
atdb/taskdatabase/models.py
+25
-25
25 additions, 25 deletions
atdb/taskdatabase/models.py
atdb/taskdatabase/templates/taskdatabase/index.html
+1
-1
1 addition, 1 deletion
atdb/taskdatabase/templates/taskdatabase/index.html
with
26 additions
and
26 deletions
atdb/taskdatabase/models.py
+
25
−
25
View file @
fefced91
...
...
@@ -118,7 +118,7 @@ class Activity(models.Model):
# flag set by ATDB to indicate that all tasks of this Activity has been processed
is_processed
=
models
.
BooleanField
(
default
=
False
)
#
TODO:
flag set (and used) by the a
ncillary
service, so that it doesn't do double work
# flag set (and used) by the a
ggregator
service, so that it doesn't do double work
is_aggregated
=
models
.
BooleanField
(
default
=
False
)
finished_fraction
=
models
.
FloatField
(
blank
=
True
,
null
=
True
)
...
...
@@ -210,6 +210,7 @@ class Task(models.Model):
def
save
(
self
,
*
args
,
**
kwargs
):
# nv:1mar2023, temporary hack, set tasks 'on hold' as soon they get to 'scrubbed'
# (users forget to do that manually, causing unwanted ingests)
# nv:8apr2024, SDO asked for this hack to be removed again.
if
(
self
.
status
!=
State
.
SCRUBBED
.
value
)
&
(
self
.
new_status
==
State
.
SCRUBBED
.
value
):
self
.
resume
=
False
...
...
@@ -231,31 +232,30 @@ class Task(models.Model):
self
.
calculated_qualities
=
qualities
.
calculate_qualities
(
self
,
tasks_for_this_sasid
,
quality_thresholds
)
# when a task goes to PROCESSED...
if
(
self
.
status
!=
State
.
PROCESSED
.
value
)
&
(
self
.
new_status
==
State
.
PROCESSED
.
value
):
# ...but only when the tasks of this activity are not yet aggregated
# (because the aggregator service also sets tasks back to processed)
if
(
self
.
activity
.
status
!=
State
.
AGGREGATED
.
value
):
# check if this task is a summary task
self
.
is_summary
=
check_if_summary
(
self
)
# if so, temporarily put it on hold so that the ancillary service can grab it with it
if
self
.
is_summary
:
# slightly bothered by the idea that ATDB puts it on HOLD and depends on the ancillary service
# to resume it. But users have earlier asked for the same dynamic for scrubbed. Acceptable
# TODO: (un)comment this
# We don't want ATDB holding tasks without a aggregator service in place to resume
self
.
resume
=
False
# TODO: Q: should ATDB do this? or the aggregator service?
#if (self.status != State.AGGREGATED.value) & (self.new_status == State.AGGREGATED.value):
# continue normal operations after aggregation,
# move the summary task back into the normal flow by setting it back to 'processed' and resume
#self.resume = True
#self.new_status = State.PROCESSED.value
if
(
self
.
status
!=
State
.
PROCESSED
.
value
)
&
(
self
.
new_status
==
State
.
PROCESSED
.
value
):
try
:
# ...but only when the tasks of this activity are not yet aggregated
# (because the aggregator service also sets tasks back to processed)
if
(
self
.
activity
.
status
!=
State
.
AGGREGATED
.
value
):
# check if this task is a summary task
self
.
is_summary
=
check_if_summary
(
self
)
# if so, temporarily put it on hold so that the ancillary service can grab it with it
if
self
.
is_summary
:
# slightly bothered by the idea that ATDB puts it on HOLD and depends on the ancillary service
# to resume it. But users have earlier asked for the same dynamic for scrubbed. Acceptable
# TODO: (un)comment this
# We don't want ATDB holding tasks without a aggregator service in place to resume
self
.
resume
=
False
except
Exception
as
error
:
# this should never happen
# But it can happen that tasks are inserted directly in an advanced status without going through
# the proper steps (like in tests). If that happens, just log the error and continue.
logger
.
error
(
error
)
# nv:20feb2024, same as above, but for backward compatibilty reasons.
# For tasks that are already beyond PROCESSED, but not yet ingested.
...
...
This diff is collapsed.
Click to expand it.
atdb/taskdatabase/templates/taskdatabase/index.html
+
1
−
1
View file @
fefced91
...
...
@@ -31,7 +31,7 @@
{% include 'taskdatabase/pagination.html' %}
</div>
</div>
<p
class=
"footer"
>
Version
5
Apr 2024
<p
class=
"footer"
>
Version
8
Apr 2024
</div>
{% include 'taskdatabase/refresh.html' %}
...
...
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