importing.rb revision 5422b48ab5841a2909cd9e53905dae4cd8418f0a
SOURCE_TYPES = %w( git svn )
STATES = %w( pending processing done failed )
included do
@queue = 'import'
end
end
# do not allow new actions if running
end
# enqueues a clone job
end
# enqueues a synchronize job
end
# enqueues a remote job
update_state! 'pending'
end
update_state! 'processing'
update_state! 'done'
end
end
end
# creates a new repository and imports the contents from the remote repository
raise Repository::ImportError, "#{source} is not a #{type} repository" unless GitRepository.send "is_#{type}_repository?", source
params[:source_type] = type
params[:source_address] = source
r = Repository.create!(params)
r
end
end
end