-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
help to get doi production stats for billing. drafts and and extra year needed for a projection.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -145,7 +145,8 @@ def totals | |
page = { size: 0, number: 1} | ||
response = nil | ||
bmt = Benchmark.ms { | ||
response = Doi.query(nil, provider_id: params[:provider_id], state: "findable,registered", page: page, totals_agg: true) | ||
state = authenticate_user!.present? && authenticate_user!.is_admin? && params[:state].present? ? params[:state] : "registered,findable" | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
kjgarza
Author
Contributor
|
||
response = Doi.query(nil, provider_id: params[:provider_id], state: state, page: page, totals_agg: true) | ||
} | ||
if bmt > 10000 | ||
logger.warn "[Benchmark Warning] clients totals " + bmt.to_s + " ms" | ||
|
I don't understand
authenticate_user!.present? && authenticate_user!.is_admin?
.