Skip to content

Commit

Permalink
fix #3264 + processing_job email subject
Browse files Browse the repository at this point in the history
  • Loading branch information
antgonza committed Mar 7, 2023
1 parent 8c25dfb commit 761f4d3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 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, self.status, self.id)

# generate message line
message = ''
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

0 comments on commit 761f4d3

Please sign in to comment.