mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-12-04 04:28:26 +01:00
reduce logging on bf v2 api calls
This commit is contained in:
parent
97845bc2dc
commit
45592733da
2 changed files with 6 additions and 6 deletions
|
@ -1,3 +1,3 @@
|
||||||
__version__ = "4.4.2.a1"
|
__version__ = "4.4.2.a2"
|
||||||
__codename__ = "Yeast Starter"
|
__codename__ = "Yeast Starter"
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ class UploadController:
|
||||||
|
|
||||||
async def get_brewfather_recipes(self,offset=0):
|
async def get_brewfather_recipes(self,offset=0):
|
||||||
limit = 50
|
limit = 50
|
||||||
loop=0
|
#loop=0
|
||||||
repeat = True
|
repeat = True
|
||||||
brewfather = True
|
brewfather = True
|
||||||
result=[]
|
result=[]
|
||||||
|
@ -97,7 +97,7 @@ class UploadController:
|
||||||
logging.error(e)
|
logging.error(e)
|
||||||
|
|
||||||
if bf_recipe_list:
|
if bf_recipe_list:
|
||||||
loop +=1
|
#loop +=1
|
||||||
for row in bf_recipe_list:
|
for row in bf_recipe_list:
|
||||||
recipe_id = row['_id']
|
recipe_id = row['_id']
|
||||||
name = row['name']
|
name = row['name']
|
||||||
|
@ -107,15 +107,15 @@ class UploadController:
|
||||||
repeat = False
|
repeat = False
|
||||||
|
|
||||||
if len(bf_recipe_list) != limit:
|
if len(bf_recipe_list) != limit:
|
||||||
logging.info(loop)
|
#logging.info(loop)
|
||||||
repeat = False
|
repeat = False
|
||||||
else:
|
else:
|
||||||
parameters={"limit": limit, 'start_after': recipe_id}
|
parameters={"limit": limit, 'start_after': recipe_id}
|
||||||
|
|
||||||
logging.info(len(result))
|
#logging.info(len(result))
|
||||||
try:
|
try:
|
||||||
newlist = sorted(result, key=lambda d: d['label'])
|
newlist = sorted(result, key=lambda d: d['label'])
|
||||||
logging.error(newlist)
|
#logging.info(newlist)
|
||||||
return newlist
|
return newlist
|
||||||
except:
|
except:
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Reference in a new issue