Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gwcelery
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
emfollow
gwcelery
Commits
fc0ffe03
Commit
fc0ffe03
authored
1 year ago
by
Geoffrey Mo
Browse files
Options
Downloads
Patches
Plain Diff
Add retry for check_vectors if data is not yet available in the caches
parent
df689013
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGES.rst
+3
-0
3 additions, 0 deletions
CHANGES.rst
gwcelery/tasks/detchar.py
+9
-4
9 additions, 4 deletions
gwcelery/tasks/detchar.py
with
12 additions
and
4 deletions
CHANGES.rst
+
3
−
0
View file @
fc0ffe03
...
...
@@ -44,6 +44,9 @@ Changelog
- Fix the triple circular uploads by rearranging the alerts canvas and
moving tasks into the second group.
- Add an automatic retry for the check_vectors task if requested data is not
yet available in the caches due to data transfer latency
2.0.6 "Spaghetti Tree" (2023-05-10)
-----------------------------------
...
...
This diff is collapsed.
Click to expand it.
gwcelery/tasks/detchar.py
+
9
−
4
View file @
fc0ffe03
...
...
@@ -374,8 +374,8 @@ def check_vector(cache, channel, start, end, bits, logic_type='all'):
None
for
key
in
bits
if
key
is
not
None
}
@app.task
(
shared
=
False
)
def
check_vectors
(
event
,
graceid
,
start
,
end
):
@app.task
(
shared
=
False
,
bind
=
True
,
default_retry_delay
=
5
)
def
check_vectors
(
self
,
event
,
graceid
,
start
,
end
):
"""
Perform data quality checks for an event and labels/logs results to
GraceDB.
...
...
@@ -452,8 +452,13 @@ def check_vectors(event, graceid, start, end):
analysis_channels
=
{
k
:
v
for
k
,
v
in
analysis_channels
if
k
[
3
:]
!=
'
DMT-DQ_VECTOR
'
}.
items
()
for
channel
,
bits
in
analysis_channels
:
states
.
update
(
check_vector
(
caches
[
channel
.
split
(
'
:
'
)[
0
]],
channel
,
start
,
end
,
bit_defs
[
bits
]))
try
:
states
.
update
(
check_vector
(
caches
[
channel
.
split
(
'
:
'
)[
0
]],
channel
,
start
,
end
,
bit_defs
[
bits
]))
except
ValueError
as
exc
:
# check_vector likely failed to find the requested data
# in the cache because it has yet to arrive
raise
self
.
retry
(
exc
=
exc
,
max_retries
=
3
)
# Pick out DQ and injection states, then filter for active detectors
dq_states
=
{
key
:
value
for
key
,
value
in
states
.
items
()
if
key
.
split
(
'
_
'
)[
-
1
]
!=
'
INJ
'
}
...
...
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