You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This triggers another commit, resulting in another call to update_url and thus register_url and a second call to the handle server
(It doesn't continue doing this because the second time through minted is non-null)
We could cut our time in half for DOI creation if we are more guarded about calling register_url
The text was updated successfully, but these errors were encountered:
NOTE
Doi registration works. It just takes more time to return than it needs to.
Description
We seem to call out to the handle server twice for every DOI we create. The first call ends has a 201 response, and the second a 200
Through the method register_url
https://github.com/datacite/lupo/blob/master/app/models/concerns/helpable.rb#L17
register_url
gets called from the Doi methodupdate_url
https://github.com/datacite/lupo/blob/master/app/models/doi.rb#L1841
Which gets called
after_commit
on creates and updateshttps://github.com/datacite/lupo/blob/master/app/models/doi.rb#L145
The
register_url
method ,after it does its initial call to the handle server, will check to see if the doi attribute minted is null. If so it will then call a databaseupdate
on the doihttps://github.com/datacite/lupo/blob/master/app/models/concerns/helpable.rb#L69
This triggers another commit, resulting in another call to
update_url
and thusregister_url
and a second call to the handle server(It doesn't continue doing this because the second time through minted is non-null)
We could cut our time in half for DOI creation if we are more guarded about calling
register_url
The text was updated successfully, but these errors were encountered: