Skip to content

fix #3264 + processing_job email subject #3265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion qiita_db/processing_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ def _generate_notification_message(self, value, error_msg):
return None

# generate subject line
subject = 'Job status change: %s (%s)' % (self.command.name, self.id)
subject = '%s: %s (%s)' % (self.command.name, value, self.id)

# generate message line
message = ''
Expand Down Expand Up @@ -1386,6 +1386,8 @@ def _complete_artifact_transformation(self, artifacts_data):

# Submit m validator jobs as n lists of jobs
n = qiita_config.job_scheduler_dependency_q_cnt
if n is None:
n = 2

# taken from:
# https://www.geeksforgeeks.org/break-list-chunks-size-n-python/
Expand Down
10 changes: 5 additions & 5 deletions qiita_db/test/test_processing_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ def test_notification_mail_generation(self):
# messages of type 'error'.
obs = self.tester1._generate_notification_message('error', None)

exp = {'subject': ('Job status change: Split libraries FASTQ '
exp = {'subject': ('Split libraries FASTQ: error '
'(063e553b-327c-4818-ab4a-adfe58e49860)'),
'message': ('Processing Job: Split libraries FASTQ\n'
f'{qiita_config.base_url}/study/description/1'
Expand All @@ -880,7 +880,7 @@ def test_notification_mail_generation(self):

obs = self.tester1._generate_notification_message('error',
'An Error Message')
exp = {'subject': ('Job status change: Split libraries FASTQ '
exp = {'subject': ('Split libraries FASTQ: error '
'(063e553b-327c-4818-ab4a-adfe58e49860)'),
'message': ('Processing Job: Split libraries FASTQ\n'
f'{qiita_config.base_url}/study/description/1\n'
Expand All @@ -891,7 +891,7 @@ def test_notification_mail_generation(self):
# The inclusion of an error message has no effect on other valid
# status types e.g. 'running'.
obs = self.tester1._generate_notification_message('running', None)
exp = {'subject': ('Job status change: Split libraries FASTQ '
exp = {'subject': ('Split libraries FASTQ: running '
'(063e553b-327c-4818-ab4a-adfe58e49860)'),
'message': ('Processing Job: Split libraries FASTQ\n'
f'{qiita_config.base_url}/study/description/1\n'
Expand All @@ -900,7 +900,7 @@ def test_notification_mail_generation(self):
self.assertDictEqual(obs, exp)

obs = self.tester1._generate_notification_message('running', 'Yahoo!')
exp = {'subject': ('Job status change: Split libraries FASTQ '
exp = {'subject': ('Split libraries FASTQ: running '
'(063e553b-327c-4818-ab4a-adfe58e49860)'),
'message': ('Processing Job: Split libraries FASTQ\n'
f'{qiita_config.base_url}/study/description/1\n'
Expand All @@ -912,7 +912,7 @@ def test_notification_mail_generation(self):
jid = '8a7a8461-e8a1-4b4e-a428-1bc2f4d3ebd0'
pj = qdb.processing_job.ProcessingJob(jid)
obs = pj._generate_notification_message('running', 'Yahoo!')
exp = {'subject': 'Job status change: Single Rarefaction '
exp = {'subject': 'Single Rarefaction: running '
'(8a7a8461-e8a1-4b4e-a428-1bc2f4d3ebd0)',
'message': 'Analysis Job Single Rarefaction\n'
f'{qiita_config.base_url}/analysis/description/1/\n'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ wetlab processing and we provide the following host references for your convenie
- auto-detect adapters and `cow <https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000/003/205/GCA_000003205.6_Btau_5.0.1/GCA_000003205.6_Btau_5.0.1_genomic.fna.gz>`_ + phix filtering
- auto-detect adapters and `hamster <https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/017/639/785/GCF_017639785.1_BCM_Maur_2.0/GCF_017639785.1_BCM_Maur_2.0_genomic.fna.gz>`_ + phix filtering
- auto-detect adapters and `horse <https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000/002/305/GCA_000002305.1_EquCab2.0/GCA_000002305.1_EquCab2.0_genomic.fna.gz>`_ + phix filtering
- auto-detect adapters and merge_genomes + phix filtering : is the combined genomes of a cheetah, cow, hamster, horse, human, mouse, pig, rabbit, and rat
- auto-detect adapters and `mouse <https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/001/635/GCF_000001635.27_GRCm39/GCF_000001635.27_GRCm39_genomic.fna.gz>`_ + phix filtering
- auto-detect adapters and `pig <https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/003/025/GCF_000003025.6_Sscrofa11.1/GCF_000003025.6_Sscrofa11.1_genomic.fna.gz>`_ + phix filtering
- auto-detect adapters and `rabbit <https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/003/625/GCF_000003625.3_OryCun2.0/GCF_000003625.3_OryCun2.0_genomic.fna.gz>`_ + phix filtering
Expand Down