From 8da467bc318f33c9e6a955e119c77f4c36c59580 Mon Sep 17 00:00:00 2001 From: Jacob Bieker Date: Tue, 12 Sep 2023 15:13:41 +0100 Subject: [PATCH] More updates to configuration --- sat/jobs.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sat/jobs.py b/sat/jobs.py index 6902ca3..7ef7b61 100644 --- a/sat/jobs.py +++ b/sat/jobs.py @@ -6,15 +6,17 @@ base_path = "/mnt/storage_c/IODC/" - +config = EumetsatConfig(api_key=EnvVar("EUMETSAT_API_KEY"), + api_secret=EnvVar("EUMETSAT_API_SECRET"), + data_dir=base_path, + start_date="2017-02-01", + end_date=pd.Timestamp().utcnow().strftime('%Y-%m-%d')) asset_jobs = [] asset_job = define_asset_job(f"download_iodc_raw_files", AssetSelection.assets(download_eumetsat_iodc_data), config={ - 'ops': {"download_eumetsat_iodc_data": {"config": EumetsatConfig(api_key=EnvVar("EUMETSAT_API_KEY"), - api_secret=EnvVar("EUMETSAT_API_SECRET"), - data_dir=base_path, - start_date="2017-02-01", - end_date=str(pd.Timestamp().utcnow())).to_fields_dict()},},}) + 'ops': {"download_eumetsat_iodc_data": { + "config": {"api_key": config.api_key, "api_secret": config.api_secret, "data_dir": config.data_dir, + "start_date": config.start_date, "end_date": config.end_date}}, }, }) asset_jobs.append(asset_job)