Skip to content

Commit

Permalink
Gwas utils#134 (#135)
Browse files Browse the repository at this point in the history
* harmonise all files regardless of published/unpublished status

* harmonise all files regardless of published/unpublished status
  • Loading branch information
jdhayhurst authored Mar 16, 2023
1 parent 0e8b87d commit a1e781a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions ftpSummaryStatsScript/ftp_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def get_new_and_modified_files(self):
return list(set(modified_studies))

def release_files_for_harmonisation(self):
for study in self.get_files_to_harmonise():
for study in self.modified_studies:
logger.info("{} --> harmonisation queue".format(study))
source = self.staging_studies_dict[study]
date_today = datetime.datetime.now().strftime("%Y%m%d")
Expand Down Expand Up @@ -260,10 +260,6 @@ def move_study_from_ftp_to_staging(self, study):
logger.info("Moving {} --> {}".format(source, dest))
self.move_dir(source, dest)

def get_files_to_harmonise(self):
eligible_files = set(self.studies_to_release_published) & self.modified_studies
return eligible_files

def sync_to_ftp(self):
# api AND staging AND NOT ftp
for study in self.to_release:
Expand Down Expand Up @@ -394,7 +390,7 @@ def main():
logger.info("==========================================")
logger.info("Unexpected on staging: {}".format(list(sumstats_sync.unexpected_on_staging)))
logger.info("==========================================")
logger.info("Adding to harmonisation queue: {}".format(list(sumstats_sync.get_files_to_harmonise())))
logger.info("Adding to harmonisation queue: {}".format(list(sumstats_sync.modified_studies)))
sendEmailReport("ftpsync.log", emailFrom=args.emailFrom, emailTo=args.emailRecipient)


Expand Down

0 comments on commit a1e781a

Please sign in to comment.