Cross Reference:
xref
: /
ontohub
/
app
/
models
/
ontology_version
/
download.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
download.rb revision 87107747f8a51d0f07c2e2a415fcf9c494783f0f
module
OntologyVersion
::
Download
extend
ActiveSupport
::
Concern
included
do
@
queue
= :
download
after_create
:
download_async
, :
if
=> :
source_uri
?
end
def
download
raise
ArgumentError.new
(
'No source_uri set.'
)
unless
source_uri
?
update_state
! :
downloading
do_or_set_failed
do
self.remote
_raw_file_url
=
self.source
_uri
save
!
end
self.async
:
parse
end
def
download_async
async
:
download
end
end