2017-06-15 119 views
0

我連接到URL,它做在5分鐘左右的東西,同時這是不可能連接到這個網站,因爲HTTP請求使用同一地址連接到URL阻塞網絡連接

我跑了溝通python代碼由ajax - 在java腳本中。

Java腳本代碼: VAR結構= { $:jQuery.noConflict(),

ExecuteUpdateData: function() { 
    var $ = this.$, 
     me = this; 
    $.ajax({ 
     type: 'POST', 
     url: '/ExecuteUpdateData/', 
    }).done(function (result) { 
     if (result != "Succeeded") 
      alert('Failed to update data, the error message: ' + result) 
     $("#update_data").attr("class", "update_data_on"); 
    }); 
} 

} Python代碼: DEF的UpdateData(A): 打印 '更新數據'

res = False 
global_server = 'http://10.184.197.149:8055' 

try: 
    response = urllib2.urlopen(global_server) 
    url_res = response.read() 
except Exception, e: 
    print(e) 
    return HttpResponse(e.message) 

return HttpResponse(url_res.strip()) 

回答

0

該問題是由URL中打開的C#代碼中的「任務」引起的