Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GraceDB Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
IGWN Computing and Software
GraceDB
GraceDB Server
Commits
9dbc445f
Commit
9dbc445f
authored
9 years ago
by
Brian Moe
Browse files
Options
Downloads
Patches
Plain Diff
Disabling send_to_overseer due to problems with imports.
parent
9a10f781
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gracedb/alert.py
+15
-15
15 additions, 15 deletions
gracedb/alert.py
with
15 additions
and
15 deletions
gracedb/alert.py
+
15
−
15
View file @
9dbc445f
...
...
@@ -8,10 +8,10 @@ from django.conf import settings
import
json
import
logging
from
hashlib
import
sha1
#
from hashlib import sha1
from
ligo.overseer.client
import
send_to_overseer
from
multiprocessing
import
Process
,
Manager
#
from ligo.overseer.client import send_to_overseer
#
from multiprocessing import Process, Manager
log
=
logging
.
getLogger
(
'
gracedb.alert
'
)
...
...
@@ -154,18 +154,18 @@ def issueXMPPAlert(event, location, alert_type="new", description="", serialized
for
nodename
in
nodenames
:
# Calculate unique message_id and log
message_id
=
sha1
(
nodename
+
msg
).
hexdigest
()
log
.
info
(
"
issueXMPPAlert: sending %s to node %s
"
%
(
message_id
,
nodename
))
rdict
=
manager
.
dict
()
msg_dict
=
{
'
node_name
'
:
nodename
,
'
message
'
:
msg
,
'
action
'
:
'
push
'
}
p
=
Process
(
target
=
send_to_overseer
,
args
=
(
msg_dict
,
rdict
,
log
,
True
))
p
.
start
()
p
.
join
()
if
rdict
.
get
(
'
success
'
,
None
):
continue
#
# Calculate unique message_id and log
#
message_id = sha1(nodename + msg).hexdigest()
#
log.info("issueXMPPAlert: sending %s to node %s" % (message_id, nodename))
#
#
rdict = manager.dict()
#
msg_dict = {'node_name': nodename, 'message': msg, 'action': 'push'}
#
p = Process(target=send_to_overseer, args=(msg_dict, rdict, log, True))
#
p.start()
#
p.join()
#
#
if rdict.get('success', None):
#
continue
# If not success, we need to do this the old way.
log
.
info
(
"
issueXMPPAlert: failover to lvalert_send
"
)
...
...
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