Skip to content

Commit ae64ced

Browse files
committed
comment extra code
code from benchmark code from relation_types is not used include dois is not used
1 parent 596ac25 commit ae64ced

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@
172172

173173
# work = {}
174174
# result = Benchmark.measure do
175-
@work = get_works(id: params["id"])
176-
halt 404 if @work[:errors].present?
175+
# @work = get_works(id: params["id"])
176+
# halt 404 if @work[:errors].present?
177177
# end
178178
# logger.info "[GetWorks] for /works/#{params["id"]} took #{(result.total * 1000).to_i} ms"
179179

@@ -182,7 +182,7 @@
182182

183183
# events = {}
184184
# result = Benchmark.measure do
185-
events = get_events('page[size]' => 1, 'page[number]' => @page, 'doi' => doi, 'include' => 'dois', 'sort' => 'relation_type_id')
185+
events = get_events('page[size]' => 1, 'page[number]' => @page, 'doi' => doi, 'sort' => 'relation_type_id')
186186
# end
187187
# logger.info "[GetEvents] for /works/#{params["id"]} took #{(result.total * 1000).to_i} ms"
188188

@@ -191,7 +191,7 @@
191191
@work[:metrics].merge!(citations_histogram: events[:meta].fetch('citationsHistogram', {}))
192192
@work[:metrics].merge!(views_histogram: events[:meta].fetch('viewsHistogram', {}))
193193
@work[:metrics].merge!(downloads_histogram: events[:meta].fetch('downloadsHistogram', {}))
194-
@work[:relation_types] = events[:meta].fetch('relationTypes', [])
194+
# @work[:relation_types] = events[:meta].fetch('relationTypes', [])
195195

196196
# check for existing claims if user is logged in and work is registered with DataCite
197197
if current_user

0 commit comments

Comments
 (0)