Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rabbitmq_agents
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
Bo-Chun Chen
rabbitmq_agents
Commits
dd2d020f
Commit
dd2d020f
authored
3 years ago
by
Bo-Chun Chen
Browse files
Options
Downloads
Patches
Plain Diff
Fix pylint too-many-instance-attributes
parent
4e9c7290
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pyproject.toml
+2
-0
2 additions, 0 deletions
pyproject.toml
rc_rmq.py
+13
-18
13 additions, 18 deletions
rc_rmq.py
with
15 additions
and
18 deletions
pyproject.toml
+
2
−
0
View file @
dd2d020f
...
@@ -8,3 +8,5 @@ disable = ["invalid-name", "import-error", "logging-fstring-interpolation", "unu
...
@@ -8,3 +8,5 @@ disable = ["invalid-name", "import-error", "logging-fstring-interpolation", "unu
max-line-length
=
79
max-line-length
=
79
[tool.pylint.TYPECHECK]
[tool.pylint.TYPECHECK]
generated-members
=
"sh"
generated-members
=
"sh"
[tool.pylint.DESIGN]
max-attributes
=
12
This diff is collapsed.
Click to expand it.
rc_rmq.py
+
13
−
18
View file @
dd2d020f
...
@@ -11,11 +11,6 @@ class RCRMQ:
...
@@ -11,11 +11,6 @@ class RCRMQ:
Main RC rabbitmq class that handles connection
Main RC rabbitmq class that handles connection
"""
"""
USER
=
"
guest
"
PASSWORD
=
"
guest
"
HOST
=
"
localhost
"
PORT
=
5672
VHOST
=
"
/
"
EXCHANGE
=
""
EXCHANGE
=
""
EXCHANGE_TYPE
=
"
direct
"
EXCHANGE_TYPE
=
"
direct
"
DEBUG
=
False
DEBUG
=
False
...
@@ -29,11 +24,11 @@ class RCRMQ:
...
@@ -29,11 +24,11 @@ class RCRMQ:
hostname
=
socket
.
gethostname
().
split
(
"
.
"
,
1
)[
0
]
hostname
=
socket
.
gethostname
().
split
(
"
.
"
,
1
)[
0
]
self
.
HOST
=
rcfg
.
Server
if
hostname
!=
rcfg
.
Server
else
"
localhost
"
host
=
rcfg
.
Server
if
hostname
!=
rcfg
.
Server
else
"
localhost
"
se
lf
.
USER
=
rcfg
.
User
u
se
r
=
rcfg
.
User
self
.
PASSWORD
=
rcfg
.
Password
password
=
rcfg
.
Password
self
.
VHOST
=
rcfg
.
VHost
vhost
=
rcfg
.
VHost
self
.
PORT
=
rcfg
.
Port
port
=
rcfg
.
Port
self
.
DEBUG
=
debug
self
.
DEBUG
=
debug
if
self
.
DEBUG
:
if
self
.
DEBUG
:
...
@@ -42,10 +37,10 @@ class RCRMQ:
...
@@ -42,10 +37,10 @@ class RCRMQ:
Created RabbitMQ instance with:
Created RabbitMQ instance with:
Exchange name:
{
self
.
EXCHANGE
}
,
Exchange name:
{
self
.
EXCHANGE
}
,
Exchange type:
{
self
.
EXCHANGE_TYPE
}
,
Exchange type:
{
self
.
EXCHANGE_TYPE
}
,
Host:
{
self
.
HOST
}
,
Host:
{
host
}
,
User:
{
se
lf
.
USER
}
,
User:
{
u
se
r
}
,
VHost:
{
self
.
VHOST
}
,
VHost:
{
vhost
}
,
Port:
{
self
.
PORT
}
Port:
{
port
}
"""
"""
)
)
...
@@ -54,10 +49,10 @@ class RCRMQ:
...
@@ -54,10 +49,10 @@ class RCRMQ:
self
.
_consuming
=
False
self
.
_consuming
=
False
self
.
_channel
=
None
self
.
_channel
=
None
self
.
_parameters
=
pika
.
ConnectionParameters
(
self
.
_parameters
=
pika
.
ConnectionParameters
(
self
.
HOST
,
host
,
self
.
PORT
,
port
,
self
.
VHOST
,
vhost
,
pika
.
PlainCredentials
(
se
lf
.
USER
,
self
.
PASSWORD
),
pika
.
PlainCredentials
(
u
se
r
,
password
),
)
)
def
connect
(
self
):
def
connect
(
self
):
...
...
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