Skip to content
Snippets Groups Projects
Commit 6bf52e68 authored by Branson Craig Stephens's avatar Branson Craig Stephens
Browse files

Fixed URL sent out in event creation LVAlert to a valid URL, namely the URL of...

Fixed URL sent out in event creation LVAlert to a valid URL, namely the URL of the event file in the web interface.
parent f6177010
No related branches found
No related tags found
No related merge requests found
......@@ -116,6 +116,7 @@ class Event(models.Model):
return "https://gracedb.ligo.org/gracedb-files/%s" % self.graceid()
return "https://ldas-jobs.phys.uwm.edu/gracedb/data/%s" % self.graceid()
# XXX This should be considered deprecated. (Branson, July 22, 2014.)
def clusterurl(self):
#return "pcdev1.phys.uwm.edu:/archive/gracedb/data/%s" % self.graceid()
return "file://pcdev1.phys.uwm.edu/archive/gracedb/data/%s" % self.graceid()
......
......@@ -261,8 +261,12 @@ def _createEventFromForm(request, form):
temp_data_loc = handle_uploaded_data(event, uploadDestination)
try:
# Send an alert.
# XXX This reverse will give the web-interface URL, not the REST URL.
# This could be a problem if anybody ever tries to use it.
# NOTE: The clusterurl method should be considered deprecated.
issueAlert(event,
os.path.join(event.clusterurl(), "private", f.name),
#os.path.join(event.clusterurl(), "private", f.name),
request.build_absolute_uri(reverse("file", args=[event.graceid(),f.name])),
temp_data_loc)
except Exception, e:
warnings += ["Problem issuing an alert (%s)" % e]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment