Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:58:21

0001 #!/usr/bin/env python
0002 #
0003 # Licensed under the Apache License, Version 2.0 (the "License");
0004 # You may not use this file except in compliance with the License.
0005 # You may obtain a copy of the License at
0006 # http://www.apache.org/licenses/LICENSE-2.0OA
0007 #
0008 # Authors:
0009 # - Wen Guan, <wen.guan@cern.ch>, 2020
0010 
0011 
0012 """
0013 Test cacher.
0014 """
0015 
0016 import sys
0017 
0018 from idds.client.client import Client
0019 from idds.common.utils import get_rest_host
0020 
0021 
0022 if len(sys.argv) == 2:
0023     workload_id = sys.argv[1]
0024     request_id = None
0025 elif len(sys.argv) == 3:
0026     workload_id = sys.argv[1]
0027     request_id = sys.argv[2]
0028 
0029 
0030 host = get_rest_host()
0031 
0032 client = Client(host=host)
0033 filename = client.download_logs(workload_id=workload_id, request_id=request_id, dest_dir='/tmp')
0034 print(filename)