File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1- __version__ = "0.10.4 "
1+ __version__ = "0.10.5 "
Original file line number Diff line number Diff line change @@ -94,6 +94,9 @@ def count_requests(
9494 def decorator (func ):
9595 @wraps (func )
9696 async def wrapper (* args , ** kwargs ):
97+
98+ function_result = await func (* args , ** kwargs )
99+
97100 if event == "files" :
98101 file_path = kwargs .get ("file_path" )
99102 if "bed" in file_path or "bigbed" in file_path .lower ():
@@ -128,7 +131,7 @@ async def wrapper(*args, **kwargs):
128131 usage_data .bedset_meta [bedset_id ] = 1
129132 else :
130133 raise ValueError (f"Unknown event type: { event } " )
131- return await func ( * args , ** kwargs )
134+ return function_result
132135
133136 return wrapper
134137
Original file line number Diff line number Diff line change @@ -172,11 +172,14 @@ def upload_usage():
172172 Upload usage data to the database and reset the usage data
173173 """
174174
175- print ("Running uploading of the usage" )
175+ _LOGGER . info ("Running uploading of the usage" )
176176 usage_data .date_to = datetime .datetime .now () + datetime .timedelta (
177177 days = USAGE_RECORD_DAYS
178178 )
179- bbagent .add_usage (usage_data )
179+ try :
180+ bbagent .add_usage (usage_data )
181+ except Exception as e :
182+ _LOGGER .error (f"Error while uploading usage data: { e } " )
180183
181184 usage_data .bed_meta = {}
182185 usage_data .bedset_meta = {}
You can’t perform that action at this time.
0 commit comments