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
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Michael Coughlin
GraceDB Server
Commits
3f5439f5
Commit
3f5439f5
authored
15 years ago
by
Brian Moe
Browse files
Options
Downloads
Patches
Plain Diff
Now using glue.lvalert.make_LVAlertTable. Added Omega filename for LUMIN.
parent
6c2ad4aa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
django-dev.wsgi
+2
-2
2 additions, 2 deletions
django-dev.wsgi
gracedb/alert.py
+14
-4
14 additions, 4 deletions
gracedb/alert.py
gracedb/translator.py
+11
-17
11 additions, 17 deletions
gracedb/translator.py
gracedb/views.py
+6
-2
6 additions, 2 deletions
gracedb/views.py
with
33 additions
and
25 deletions
django-dev.wsgi
+
2
−
2
View file @
3f5439f5
...
...
@@ -5,8 +5,8 @@ sys.path.append('/home/lars/django')
# OK, the lib/lib64 situation should be handled better.
sys.path.append('/opt/lscsoft
/glue
/lib64/python2.4/site-packages')
sys.path.append('/opt/lscsoft
/glue
/lib/python2.4/site-packages')
sys.path.append('/opt/lscsoft
-bleed
/lib64/python2.4/site-packages')
sys.path.append('/opt/lscsoft
-bleed
/lib/python2.4/site-packages')
sys.path.append('/opt/lscsoft/pylal/lib/python2.4/site-packages')
sys.path.append('/opt/lscsoft/pylal/lib64/python2.4/site-packages')
...
...
This diff is collapsed.
Click to expand it.
gracedb/alert.py
+
14
−
4
View file @
3f5439f5
...
...
@@ -2,15 +2,19 @@
import
sys
import
time
from
subprocess
import
Popen
,
PIPE
,
STDOUT
import
StringIO
from
django.core.mail
import
send_mail
from
django.conf
import
settings
from
django.contrib.sites.models
import
Site
from
django.core.urlresolvers
import
reverse
,
get_script_prefix
import
glue.ligolw.utils
import
glue.lvalert.utils
def
issueAlert
(
event
,
location
):
issueXMPPAlert
(
event
,
location
)
def
issueAlert
(
event
,
location
,
temp_data_loc
):
issueXMPPAlert
(
event
,
location
,
temp_data_loc
)
issueEmailAlert
(
event
,
location
)
def
indent
(
nindent
,
text
):
...
...
@@ -49,7 +53,7 @@ Event Summary:
indent
(
3
,
prepareSummary
(
event
)))
send_mail
(
subject
,
message
,
fromaddress
,
toaddress
)
def
issueXMPPAlert
(
event
,
location
):
def
issueXMPPAlert
(
event
,
location
,
temp_data_loc
):
nodename
=
"
%s_%s
"
%
(
event
.
group
.
name
,
event
.
get_analysisType_display
())
nodename
=
nodename
.
lower
()
...
...
@@ -75,7 +79,13 @@ def issueXMPPAlert(event, location):
stdout
=
null
,
stderr
=
STDOUT
,
env
=
env
)
msg
=
createPayload
(
event
.
graceid
(),
location
)
#msg = createPayload(event.graceid(), location)
xmldoc
=
glue
.
lvalert
.
utils
.
make_LVAlertTable
(
""
,
location
,
event
.
graceid
(),
temp_data_loc
)
buf
=
StringIO
.
StringIO
()
glue
.
ligolw
.
utils
.
write_fileobj
(
xmldoc
,
buf
)
msg
=
buf
.
getvalue
()
p
.
stdin
.
write
(
msg
)
p
.
stdin
.
close
()
for
i
in
range
(
1
,
10
):
...
...
This diff is collapsed.
Click to expand it.
gracedb/translator.py
+
11
−
17
View file @
3f5439f5
...
...
@@ -19,6 +19,7 @@ def handle_uploaded_data(event, datafilename,
log_filename
=
'
event.log
'
,
coinc_table_filename
=
'
coinc.xml
'
):
temp_data_loc
=
""
if
event
.
analysisType
==
'
HM
'
:
# Wildly speculative
xmldoc
=
glue
.
ligolw
.
utils
.
load_filename
(
datafilename
)
...
...
@@ -68,18 +69,14 @@ def handle_uploaded_data(event, datafilename,
if
event
.
analysisType
==
'
MBTA
'
:
#
xmldoc, log_data, detectors, cid = populate_inspiral_tables("MbtaFake-930909680-16.gwf")
#
final_xmldoc = populate_coinc_tables(xmldoc,cid,insp_event_id_dict,\
#
InspiralCoincDef,detectors)
#
here's how it works for inspirals
#
populate the tables
#
xmldoc, log_data, temp_data_loc = populate_inspiral_tables("MbtaFake-930909680-16.gwf")
#write the output
#write_output_files('.', xmldoc, log_data)
xmldoc
,
log_data
,
detectors
,
cid
=
\
xmldoc
,
log_data
,
temp_data_loc
=
\
populate_inspiral_tables
(
datafilename
)
xmldoc
=
populate_coinc_tables
(
xmldoc
,
cid
,
insp_event_id_dict
,
InspiralCoincDef
,
detectors
)
output_dir
=
os
.
path
.
dirname
(
datafilename
)
write_output_files
(
output_dir
,
xmldoc
,
log_data
,
...
...
@@ -124,16 +121,11 @@ def handle_uploaded_data(event, datafilename,
event
.
save
()
elif
event
.
analysisType
==
'
OM
'
:
# Omega
#xmldoc, log_data, detectors, cid = populate_burst_tables("initial.data")
#final_xmldoc = populate_coinc_tables(xmldoc,cid, coherent_event_id_dict,\
# BurstCoincDef, detectors)
#here's how it works for bursts
#xmldoc, log_data, temp_data_loc = populate_burst_tables("initial.data")
#write_output_files('.', final_xmldoc, log_data)
xmldoc
,
log_data
,
detectors
,
cid
=
populate_burst_tables
(
datafilename
)
xmldoc
=
populate_coinc_tables
(
xmldoc
,
cid
,
\
coherent_event_id_dict
,
BurstCoincDef
,
\
detectors
)
xmldoc
,
log_data
,
temp_data_loc
=
populate_burst_tables
(
datafilename
)
output_dir
=
os
.
path
.
dirname
(
datafilename
)
write_output_files
(
output_dir
,
xmldoc
,
log_data
)
...
...
@@ -175,3 +167,5 @@ def handle_uploaded_data(event, datafilename,
event
.
save
()
else
:
pass
return
temp_data_loc
This diff is collapsed.
Click to expand it.
gracedb/views.py
+
6
−
2
View file @
3f5439f5
...
...
@@ -66,10 +66,14 @@ def create(request):
createWikiPage
(
event
.
graceid
())
# Extract Info from uploaded data
handle_uploaded_data
(
event
,
uploadDestination
)
# Temp (ha!) hack to deal with
# out of band data from Omega to LUMIN.
temp_data_loc
=
handle_uploaded_data
(
event
,
uploadDestination
)
# Send an alert.
issueAlert
(
event
,
os
.
path
.
join
(
event
.
clusterurl
(),
"
private
"
,
f
.
name
))
issueAlert
(
event
,
os
.
path
.
join
(
event
.
clusterurl
(),
"
private
"
,
f
.
name
),
temp_data_loc
)
#return HttpResponseRedirect(reverse(view, args=[event.graceid()]))
except
:
# something went wrong.
...
...
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