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 William Coughlin
GraceDB Server
Commits
644bc34e
Commit
644bc34e
authored
13 years ago
by
Brian Moe
Browse files
Options
Downloads
Patches
Plain Diff
Put web-data root into settings. Format of FAR in log.
parent
ca5e7348
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gracedb/translator.py
+1
-1
1 addition, 1 deletion
gracedb/translator.py
gracedb/views.py
+6
-4
6 additions, 4 deletions
gracedb/views.py
settings.py
+4
-1
4 additions, 1 deletion
settings.py
with
11 additions
and
6 deletions
gracedb/translator.py
+
1
−
1
View file @
644bc34e
...
...
@@ -76,7 +76,7 @@ def handle_uploaded_data(event, datafilename,
log_data
.
append
(
"
SNR: %0.3f
"
%
origdata
[
0
][
0
].
snr
)
log_data
.
append
(
"
IFOs: %s
"
%
origdata
[
0
][
0
].
ifos
)
if
origdata
[
0
][
0
].
combined_far
is
not
None
:
log_data
.
append
(
"
FAR: %0.3
f
"
%
origdata
[
0
][
0
].
combined_far
)
log_data
.
append
(
"
FAR: %0.3
e
"
%
origdata
[
0
][
0
].
combined_far
)
else
:
log_data
.
append
(
"
FAR: ---
"
)
except
Exception
,
e
:
...
...
This diff is collapsed.
Click to expand it.
gracedb/views.py
+
6
−
4
View file @
644bc34e
...
...
@@ -27,6 +27,8 @@ from buildVOEvent import buildVOEvent, submitToSkyalert
# XXX This should be configurable / moddable or something
MAX_QUERY_RESULTS
=
1000
GRACEDB_DATA_DIR
=
settings
.
GRACEDB_DATA_DIR
import
simplejson
def
index
(
request
):
...
...
@@ -228,7 +230,7 @@ def _createEventFromForm(request, form):
saved
=
True
# in case we have to undo this.
# Create data directory/directories
# Save uploaded file.
dirPrefix
=
"
/mnt/gracedb-web/data
"
dirPrefix
=
GRACEDB_DATA_DIR
eventDir
=
os
.
path
.
join
(
dirPrefix
,
event
.
graceid
())
os
.
mkdir
(
eventDir
)
os
.
mkdir
(
os
.
path
.
join
(
eventDir
,
"
private
"
)
)
...
...
@@ -276,7 +278,7 @@ def _createEventFromForm(request, form):
def
_saveUploadedFile
(
event
,
uploadedFile
):
# XXX Hardcoding.
fname
=
os
.
path
.
join
(
"
/mnt/gracedb-web/data
"
,
event
.
graceid
(),
"
private
"
,
uploadedFile
.
name
)
fname
=
os
.
path
.
join
(
GRACEDB_DATA_DIR
,
event
.
graceid
(),
"
private
"
,
uploadedFile
.
name
)
f
=
open
(
fname
,
"
w
"
)
for
chunk
in
uploadedFile
.
chunks
():
f
.
write
(
chunk
)
...
...
@@ -354,7 +356,7 @@ def upload(request):
# Badnesses:
# Same hardcoded path in multiple places.
# What if we're clobbering an existing file?
fname
=
os
.
path
.
join
(
"
/mnt/gracedb-web/data
"
,
event
.
graceid
(),
"
private
"
,
uploadedfile
.
name
)
fname
=
os
.
path
.
join
(
GRACEDB_DATA_DIR
,
event
.
graceid
(),
"
private
"
,
uploadedfile
.
name
)
f
=
open
(
fname
,
"
w
"
)
for
chunk
in
uploadedfile
.
chunks
():
f
.
write
(
chunk
)
...
...
@@ -831,7 +833,7 @@ def flexigridResponse(request, objects):
return
response
def
get_file
(
graceid
,
filename
=
"
event.log
"
):
dirPrefix
=
"
/mnt/gracedb-web/data
"
dirPrefix
=
GRACEDB_DATA_DIR
logfilename
=
os
.
path
.
join
(
dirPrefix
,
graceid
,
"
private
"
,
filename
)
contents
=
""
try
:
...
...
This diff is collapsed.
Click to expand it.
settings.py
+
4
−
1
View file @
644bc34e
...
...
@@ -35,7 +35,7 @@ ALERT_EMAIL_BCC = [
ALERT_TEST_EMAIL_FROM
=
"
GraCEDb TEST <gracedb@archie.phys.uwm.edu>
"
ALERT_TEST_EMAIL_TO
=
[
"
bmoe@gravity.phys.uwm.edu
"
,
#
"bmoe@gravity.phys.uwm.edu",
]
XMPP_ALERT_CHANNELS
=
[
...
...
@@ -67,6 +67,9 @@ SKYALERT_DESCRIPTION = "LIGO / Virgo trigger"
SKYALERT_SUBMITTERS
=
[
'
Patrick Brady
'
,
'
Brian Moe
'
]
GRACEDB_DATA_DIR
=
"
/mnt/gracedb-web/data
"
#GRACEDB_DATA_DIR = "/mnt/gracedb-web-temp/data"
# Latency histograms. Where they go and max latency to bin.
LATENCY_REPORT_DEST_DIR
=
"
/home/gracedb/data/latency
"
LATENCY_MAXIMUM_CHARTED
=
1800
...
...
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