зеркало из https://github.com/nextcloud/news.git
fix another error, better debugging
This commit is contained in:
Родитель
c67335d9f8
Коммит
1f9784dbdb
|
@ -47,9 +47,10 @@ class UpdateThread(threading.Thread):
|
|||
else:
|
||||
return
|
||||
|
||||
# call the update method of one feed
|
||||
feed['feedId'] = feed['id']
|
||||
del feed['id']
|
||||
|
||||
# call the update method of one feed
|
||||
data = urllib.parse.urlencode(feed)
|
||||
headers = {
|
||||
'Content-type': 'application/json',
|
||||
|
@ -58,9 +59,12 @@ class UpdateThread(threading.Thread):
|
|||
url = '%s?%s' % (self.update_url, data)
|
||||
|
||||
try:
|
||||
response = urllib.request.urlopen(url)
|
||||
except urllib.error.HTTPError:
|
||||
print('%s does not exist' % url)
|
||||
response = urllib.request.urlopen(url, timeout=60)
|
||||
print('succ!')
|
||||
print(url)
|
||||
print(response.read())
|
||||
except urllib.error.HTTPError as e:
|
||||
print('%s: %s' % (url, e))
|
||||
|
||||
self.run()
|
||||
|
||||
|
|
|
@ -209,7 +209,7 @@ class FeedAPI extends Controller {
|
|||
*/
|
||||
public function update() {
|
||||
$userId = $this->params('userId');
|
||||
$feedId = $this->params('feedId');
|
||||
$feedId = (int) $this->params('feedId');
|
||||
|
||||
try {
|
||||
$this->feedBusinessLayer->update($feedId, $userId);
|
||||
|
|
Загрузка…
Ссылка в новой задаче