我有以下控制器路径,应该将文件上传到azure。
def do_upload(upload, container_name, path, name, data)
Azure.config.storage_account_name = APP_CONFIG['ac_name']
Azure.config.storage_access_key = APP_CONFIG['key']
azure_blob_service = Azure::Blob::BlobService.new
begin
container = azure_blob_service.get_container_properties(container_name)
rescue => error
puts error
upload.upload_failed = true
upload.save
render :body => nil, :status => 503 and return
end
begin
azure_blob_service.create_block_blob(container.name, path + name, data, {chunking: true, timeout: 300})
rescue => error
puts error
upload.upload_failed = true
upload.save
render :body => nil, :status => 503 and return
end
upload.number_of_files += 1 unless (params[:type] == 'thumbnail' || params[:type] == 'model')
upload.save
render json: { :status => 200 } and return
end
我使用azure-contrib将分块文件上传到azure,而azure-contrib依次使用Celluloid。
我得到的错误是:
I, [2016-10-24T11:42:15.290622 #65239] INFO -- : Completed 500 Internal Server Error in 93ms (ActiveRecord: 4.7ms)
F, [2016-10-24T11:42:15.296640 #65239] FATAL -- :
F, [2016-10-24T11:42:15.312435 #65239] FATAL -- : fatal (No live threads left. Deadlock?):
F, [2016-10-24T11:42:15.312543 #65239] FATAL -- :