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