File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -368,9 +368,13 @@ def parse_and_write_pangolin_report(self) -> list[FohmPangolinReport]:
368
368
self .create_pangolin_report (sars_cov_pangolin_reports )
369
369
return sars_cov_pangolin_reports
370
370
371
- def aggregate_delivery (self , cases : list [str ]) -> None :
372
- """Aggregate and hardlink reports."""
373
- self .set_cases_to_aggregate (cases )
371
+ def aggregate_delivery (self , case_ids : list [str ]) -> None :
372
+ """
373
+ Aggregate and hardlink reports.
374
+ args:
375
+ case_ids: The internal ids for cases to aggregate.
376
+ """
377
+ self .set_cases_to_aggregate (case_ids )
374
378
self .create_daily_delivery_folders ()
375
379
sars_cov_complementary_reports : list [FohmComplementaryReport ] = (
376
380
self .parse_and_write_complementary_report ()
Original file line number Diff line number Diff line change 1
1
from click import Context
2
2
3
+ from cg .meta .upload .fohm .fohm import FOHMUploadAPI
4
+ from cg .meta .upload .gisaid import GisaidAPI
3
5
from cg .meta .upload .upload_api import UploadAPI
4
6
from cg .meta .workflow .mutant import MutantAnalysisAPI
5
7
from cg .models .cg_config import CGConfig
@@ -10,10 +12,16 @@ class MutantUploadAPI(UploadAPI):
10
12
11
13
def __init__ (self , config : CGConfig ):
12
14
self .analysis_api : MutantAnalysisAPI = MutantAnalysisAPI (config )
15
+ self .fohm_api = FOHMUploadAPI (config )
16
+ self .gsaid_api = GisaidAPI (config )
17
+
13
18
super ().__init__ (config = config , analysis_api = self .analysis_api )
14
19
15
20
def upload (self , ctx : Context , case : Case , restart : bool ) -> None :
16
21
latest_analysis : Analysis = case .analyses [0 ]
17
22
self .update_upload_started_at (latest_analysis )
18
23
self .upload_files_to_customer_inbox (case )
24
+ self .gsaid_api .upload (case .internal_id )
25
+ self .fohm_api .aggregate_delivery (case_ids = [case .internal_id ])
26
+ self .fohm_api .sync_files_sftp ()
19
27
self .update_uploaded_at (latest_analysis )
You can’t perform that action at this time.
0 commit comments