@@ -514,7 +514,7 @@ def audit(self, audit_settings: types.ConfigSettings) -> list[Problem]:
514514 return problems
515515
516516
517- def search (endpoint : pf .Platform , only_current : bool = False , component_key : str = None ) -> list [Task ]:
517+ def search (endpoint : pf .Platform , only_current : bool = False , component_key : str = None , ** kwargs ) -> list [Task ]:
518518 """Searches background tasks
519519
520520 :param Platform endpoint: Reference to the SonarQube platform
@@ -525,6 +525,7 @@ def search(endpoint: pf.Platform, only_current: bool = False, component_key: str
525525 :rtype: list[Task]
526526 """
527527 params = {"status" : "," .join (STATUSES ), "additionalFields" : "warnings" }
528+ params .update (** kwargs )
528529 if only_current :
529530 params ["onlyCurrents" ] = "true"
530531 if component_key is not None :
@@ -538,11 +539,12 @@ def search_all_last(endpoint: pf.Platform) -> list[Task]:
538539 return search (endpoint = endpoint , only_current = True )
539540
540541
541- def search_last (endpoint : pf .Platform , component_key : str ) -> Optional [Task ]:
542+ def search_last (endpoint : pf .Platform , component_key : str , ** params ) -> Optional [Task ]:
542543 """Searches for last background task of a component"""
543- bg_tasks = search (endpoint = endpoint , only_current = True , component_key = component_key )
544+ bg_tasks = search (endpoint = endpoint , only_current = True , component_key = component_key , ** params )
544545 if len (bg_tasks ) == 0 :
545546 # No bgtask was found
547+ log .debug ("No background task found for %s" , component_key )
546548 return None
547549 return bg_tasks [0 ]
548550
0 commit comments