Improved owncloud quota monitor backend resiliance to connection errors
This commit is contained in:
parent
5a8dfba893
commit
0b30e0e9dd
6
TODO.md
6
TODO.md
|
@ -467,9 +467,3 @@ with open(file) as handler:
|
|||
|
||||
|
||||
# SAVE INISTIAL PASSWORD from all services, and just use it to create the service, never update it
|
||||
|
||||
|
||||
# Eliminar tots els serveis de l'account no elimina les factures, pero crec que queda pendent arreglar el missatge summary, perque allà diu que s'eliminaran N factures, xo no surten llistades a la llista d'objectes oi?
|
||||
|
||||
# Make owncloud quota backend more resilient to HTTP/connection errors
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import re
|
||||
import sys
|
||||
import textwrap
|
||||
import time
|
||||
import xml.etree.ElementTree as ET
|
||||
from urllib.parse import urlparse
|
||||
|
||||
|
@ -159,6 +160,10 @@ class OwnCloudDiskQuota(OwnClouwAPIMixin, ServiceMonitor):
|
|||
return replace(context, "'", '"')
|
||||
|
||||
def get_quota(self, saas, server):
|
||||
try:
|
||||
user = self.get_user(saas)
|
||||
except requests.exceptions.ConnectionError:
|
||||
time.sleep(2)
|
||||
user = self.get_user(saas)
|
||||
context = {
|
||||
'object_id': saas.pk,
|
||||
|
|
Loading…
Reference in New Issue