File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
src/clusterfuzz/_internal Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 2020from google .cloud import batch_v1 as batch
2121
2222from clusterfuzz ._internal .base import retry
23- from clusterfuzz ._internal .remote_task import RemoteTaskInterface
2423from clusterfuzz ._internal .google_cloud_utils import credentials
2524from clusterfuzz ._internal .metrics import logs
25+ from clusterfuzz ._internal .remote_task import RemoteTaskInterface
2626
2727_local = threading .local ()
2828
Original file line number Diff line number Diff line change 2121from clusterfuzz ._internal .base .tasks import task_utils
2222from clusterfuzz ._internal .batch .data_structures import BatchTask
2323from clusterfuzz ._internal .batch .data_structures import BatchWorkloadSpec
24+ from clusterfuzz ._internal .batch .gcp import GcpBatchClient
2425from clusterfuzz ._internal .config import local_config
2526from clusterfuzz ._internal .datastore import data_types
2627from clusterfuzz ._internal .datastore import ndb_utils
@@ -174,8 +175,8 @@ def _get_specs_from_config(batch_tasks) -> Dict:
174175class BatchService :
175176 """Batch service."""
176177
177- def __init__ (self , client ):
178- self ._client = client
178+ def __init__ (self ):
179+ self ._client = GcpBatchClient ()
179180
180181 def create_uworker_main_batch_job (self , module , job_type , input_download_url ):
181182 command = task_utils .get_command_from_module (module )
Original file line number Diff line number Diff line change 1515from typing import List
1616
1717from clusterfuzz ._internal .batch .data_structures import BatchTask
18- from clusterfuzz ._internal .batch .gcp import GcpBatchClient
1918from clusterfuzz ._internal .batch .service import BatchService
2019
2120
2221def create_uworker_main_batch_job (module , job_type , input_download_url ):
2322 """Creates a batch job."""
24- service = BatchService (GcpBatchClient () )
23+ service = BatchService ()
2524 return service .create_uworker_main_batch_job (module , job_type ,
2625 input_download_url )
2726
2827
2928def create_uworker_main_batch_jobs (batch_tasks : List [BatchTask ]):
3029 """Creates batch jobs."""
31- service = BatchService (GcpBatchClient () )
30+ service = BatchService ()
3231 return service .create_uworker_main_batch_jobs (batch_tasks )
You can’t perform that action at this time.
0 commit comments