Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rabbitmq_agents
Manage
Activity
Members
Labels
Plan
Issues
14
Issue boards
Milestones
Wiki
Code
Merge requests
8
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rc
rabbitmq_agents
Commits
570f0fb7
Commit
570f0fb7
authored
4 years ago
by
Eesaan Atluri
Browse files
Options
Downloads
Patches
Plain Diff
Use parameters from the rabbit config file in subscribe_mail_list
parent
02bb215a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
4 merge requests
!147
Merge previous default branch feat-cod-rmq into main
,
!85
kill nginx process running under user from login node
,
!78
Feat cod rmq
,
!60
Use a single merged config file for all agents
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
subscribe_mail_lists.py
+7
-3
7 additions, 3 deletions
subscribe_mail_lists.py
with
7 additions
and
3 deletions
subscribe_mail_lists.py
+
7
−
3
View file @
570f0fb7
...
@@ -7,6 +7,7 @@ import argparse
...
@@ -7,6 +7,7 @@ import argparse
import
rc_util
import
rc_util
from
email.message
import
EmailMessage
from
email.message
import
EmailMessage
from
rc_rmq
import
RCRMQ
from
rc_rmq
import
RCRMQ
import
rabbit_config
as
rcfg
task
=
'
subscribe_mail_list
'
task
=
'
subscribe_mail_list
'
...
@@ -28,8 +29,10 @@ def mail_list_subscription(ch, method, properties, body):
...
@@ -28,8 +29,10 @@ def mail_list_subscription(ch, method, properties, body):
fullname
=
msg
[
'
fullname
'
]
fullname
=
msg
[
'
fullname
'
]
email
=
msg
[
'
email
'
]
email
=
msg
[
'
email
'
]
mail_list_admin
=
'
root@localhost
'
#change this during deploy
mail_list_admin
=
rcfg
.
Sender
mail_list
=
'
LISTSERV@LISTSERV.UAB.EDU
'
mail_list
=
rcfg
.
Mail_list
mail_list_bcc
=
rcfg
.
Mail_list_bcc
server
=
rcfg
.
Server
listserv_cmd
=
f
'
QUIET ADD hpc-announce
{
email
}
{
fullname
}
\
listserv_cmd
=
f
'
QUIET ADD hpc-announce
{
email
}
{
fullname
}
\
\n
QUIET ADD hpc-users
{
email
}
{
fullname
}
'
\n
QUIET ADD hpc-users
{
email
}
{
fullname
}
'
...
@@ -43,9 +46,10 @@ def mail_list_subscription(ch, method, properties, body):
...
@@ -43,9 +46,10 @@ def mail_list_subscription(ch, method, properties, body):
email_msg
[
'
From
'
]
=
mail_list_admin
email_msg
[
'
From
'
]
=
mail_list_admin
email_msg
[
'
To
'
]
=
mail_list
email_msg
[
'
To
'
]
=
mail_list
email_msg
[
'
Subject
'
]
=
''
email_msg
[
'
Subject
'
]
=
''
email_msg
[
'
Bcc
'
]
=
mail_list_bcc
# Create an smtp object and send email
# Create an smtp object and send email
s
=
smtplib
.
SMTP
(
'
localhost
'
)
s
=
smtplib
.
SMTP
(
server
)
email_msg
.
set_content
(
listserv_cmd
)
email_msg
.
set_content
(
listserv_cmd
)
if
not
args
.
dry_run
:
if
not
args
.
dry_run
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment