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
bbd78f17
Commit
bbd78f17
authored
6 years ago
by
Tanner Prestegard
Committed by
GraceDB
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Removing unused _createLog function
parent
cf486ce3
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/events/view_logic.py
+0
-43
0 additions, 43 deletions
gracedb/events/view_logic.py
with
0 additions
and
43 deletions
gracedb/events/view_logic.py
+
0
−
43
View file @
bbd78f17
...
...
@@ -279,49 +279,6 @@ def delete_label(event, request, labelName, doXMPP=True):
# Return the json for some reason. I don't do any alert stuff in here.
return
json
.
dumps
(
d
)
# 8 May 2017 (TP): this function doesn't appear to be used anywhere
def
_createLog
(
request
,
graceid
,
comment
,
uploadedFile
=
None
):
response
=
HttpResponse
(
mimetype
=
'
application/json
'
)
rdict
=
{}
try
:
event
=
graceid
and
Event
.
getByGraceid
(
graceid
)
except
Event
.
DoesNotExist
:
event
=
None
if
not
event
:
rdict
[
'
error
'
]
=
"
No such event id: %s
"
%
graceid
elif
(
not
comment
)
and
(
not
uploadedFile
):
rdict
[
'
error
'
]
=
"
Missing argument(s)
"
else
:
logEntry
=
EventLog
(
event
=
event
,
issuer
=
request
.
user
,
comment
=
comment
)
if
uploadedFile
:
file_version
=
None
try
:
file_version
=
_saveUploadedFile
(
event
,
uploadedFile
)
logEntry
.
filename
=
uploadedFile
.
name
logEntry
.
file_version
=
file_version
except
Exception
,
e
:
rdict
[
'
error
'
]
=
"
Problem saving file: %s
"
%
str
(
e
)
try
:
logEntry
.
save
()
description
=
"
LOG:
"
if
uploadedFile
:
description
=
"
UPLOAD:
'
%s
'
"
%
uploadedFile
.
name
issueAlertForUpdate
(
event
,
description
+
comment
,
doxmpp
=
True
,
filename
=
uploadedFile
.
name
,
serialized_object
=
eventLogToDict
(
logEntry
,
request
=
request
))
except
Exception
,
e
:
rdict
[
'
error
'
]
=
"
Failed to save log message: %s
"
%
str
(
e
)
# XXX should be json
rval
=
str
(
rdict
)
response
[
'
Content-length
'
]
=
len
(
rval
)
response
.
write
(
rval
)
return
response
def
get_performance_info
():
# First, try to find the relevant logfile from settings.
...
...
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