Skip to content

Commit

Permalink
Rsync transfers from web to download need to be prioritized
Browse files Browse the repository at this point in the history
  • Loading branch information
glormph committed Feb 10, 2025
1 parent 37067fb commit 019e241
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions deploy/default_inventory/group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ celeryenv_file: "{{ kanteledir }}/celery.env"
kantelelogdir: "{{ kanteledir }}/log"

queue_local: mv_md5_storage
queue_web_rsync: web_rsync
queue_dl: file_download
queue_backup: backup_archive
queue_scan: scaninbox
3 changes: 2 additions & 1 deletion deploy/templates/celery_storage_env.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CELERYD_NODES="local download backup scaninbox"
CELERY_BIN="{{ kanteledir }}/venv/bin/celery"
CELERYD_MULTI="multi"
CELERY_APP="kantele"
CELERYD_OPTS="-c:local 4 -c:download 1 -c:backup 2 -c:scaninbox 1 -Q:local {{ queue_local }} -Q:download {{ queue_dl }} -Q:backup {{ queue_backup }} -Q:scaninbox {{ queue_scan }} --statedb={{ kantelelogdir }}/%n%I.state"
CELERYD_OPTS="-c:local 4 -c:download 1 -c:webrsync 1 -c:backup 2 -c:scaninbox 1 -Q:local {{ queue_local }} -Q:download {{ queue_dl }} -Q:webrsync {{ queue_web_rsync }} -Q:backup {{ queue_backup }} -Q:scaninbox {{ queue_scan }} --statedb={{ kantelelogdir }}/%n%I.state"
CELERYD_LOG_LEVEL="INFO"
CELERYD_LOG_FILE="{{ kantelelogdir }}/%n%I.log"
CELERYD_PID_FILE="{{ kantelelogdir }}/%n%I.pid"
Expand Down Expand Up @@ -34,6 +34,7 @@ SECONDARY_STORAGE_RSYNC_USER='{{ secondary_storage_user }}'
SECONDARY_STORAGE_RSYNC_KEY='{{ secondary_storage_sshkey }}'

QUEUE_STORAGE="{{ queue_local }}"
QUEUE_WEB_RSYNC ="{{ queue_web_rsync }}"
QUEUE_FILE_DOWNLOAD="{{ queue_dl }}"
QUEUE_BACKUP="{{ queue_backup }}"
QUEUE_SEARCH_INBOX="{{ queue_scan }}"
1 change: 1 addition & 0 deletions src/backend/kantele/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
CLIENT_APIKEYS = [STORAGECLIENT_APIKEY, ANALYSISCLIENT_APIKEY, ADMIN_APIKEY]
QUEUE_STORAGE = os.environ.get('QUEUE_STORAGE', 'mv_md5_storage')
QUEUE_FILE_DOWNLOAD = os.environ.get('QUEUE_FILE_DOWNLOAD', 'file_download')
QUEUE_WEB_RSYNC = os.environ.get('QUEUE_FILE_DOWNLOAD', 'web_rsync')
QUEUE_BACKUP = os.environ.get('QUEUE_BACKUP', 'backup_archive')
QUEUE_NXF = os.environ.get('QUEUE_NXF', 'nextflow')
QUEUE_QC_NXF = os.environ.get('QUEUE_QC_NXF', 'qc_nextflow')
Expand Down
2 changes: 1 addition & 1 deletion src/backend/rawstatus/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def download_px_file_raw(self, ftpurl, ftpnetloc, sf_id, raw_id, shasum, size, s
print('MD5 of {} is {}, registered in DB'.format(dstfile, postdata['md5']))


@shared_task(queue=settings.QUEUE_FILE_DOWNLOAD, bind=True)
@shared_task(queue=settings.QUEUE_WEB_RSYNC, bind=True)
def rsync_transfer_file(self, sfid, srcpath, dstpath, dstsharename, do_unzip, stablefiles):
'''Uses rsync to transfer uploaded file from KANTELEHOST/other RSYNC_HOST to storage server.
In case of a zipped folder transfer, the file is unzipped and an MD5 check is done
Expand Down

0 comments on commit 019e241

Please sign in to comment.