# HG changeset patch # User enis # Date 1752613805 0 # Node ID 79160beab2a4fb83213cee1101383af1912ac3ef # Parent cd36336ffaf6c2be071917ce71eae15d8f474c94 planemo upload for repository https://github.com/afgane/gcp_batch_netcat diff -r cd36336ffaf6 -r 79160beab2a4 gcp_batch_netcat.py --- a/gcp_batch_netcat.py Tue Jul 15 14:55:51 2025 +0000 +++ b/gcp_batch_netcat.py Tue Jul 15 21:10:05 2025 +0000 @@ -3,6 +3,8 @@ import subprocess import argparse import uuid +import time +import os def main(): parser = argparse.ArgumentParser() @@ -11,8 +13,12 @@ parser.add_argument('--project', required=True) parser.add_argument('--region', required=True) parser.add_argument('--port', default='2049') + parser.add_argument('--service_account_key', required=True) args = parser.parse_args() + # Set up authentication using the service account key + os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = args.service_account_key + job_name = f'netcat-job-{uuid.uuid4()}' job_spec = { @@ -48,6 +54,9 @@ '--format=text' ] + # Wait 4 minutes before submitting the job + time.sleep(240) + try: result = subprocess.run(command, capture_output=True, text=True, check=True) with open(args.output, 'w') as f: diff -r cd36336ffaf6 -r 79160beab2a4 gcp_batch_netcat.xml --- a/gcp_batch_netcat.xml Tue Jul 15 14:55:51 2025 +0000 +++ b/gcp_batch_netcat.xml Tue Jul 15 21:10:05 2025 +0000 @@ -6,13 +6,14 @@ afgane/gcp-batch-netcat:0.1.0 +