Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
check_mysql_slave
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
nimrod
check_mysql_slave
Commits
7eb9f7c9
Commit
7eb9f7c9
authored
4 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
Use the docstring as the description.
parent
43fef94f
No related branches found
No related tags found
No related merge requests found
Pipeline
#846
passed
4 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
check_mysql_slave/__init__.py
+1
-4
1 addition, 4 deletions
check_mysql_slave/__init__.py
setup.py
+2
-2
2 additions, 2 deletions
setup.py
with
3 additions
and
6 deletions
check_mysql_slave/__init__.py
+
1
−
4
View file @
7eb9f7c9
...
@@ -16,9 +16,6 @@ except ImportError:
...
@@ -16,9 +16,6 @@ except ImportError:
pass
pass
DESCRIPTION
=
"
Check MySQL seconds behind master for Nagios-like monitoring.
"
def
get_slave_status
(
host
,
user
,
passwd
,
port
):
def
get_slave_status
(
host
,
user
,
passwd
,
port
):
"""
Returns a dictionary of the
'
SHOW SLAVE STATUS;
'
command output.
"""
"""
Returns a dictionary of the
'
SHOW SLAVE STATUS;
'
command output.
"""
try
:
try
:
...
@@ -37,7 +34,7 @@ def get_slave_status(host, user, passwd, port):
...
@@ -37,7 +34,7 @@ def get_slave_status(host, user, passwd, port):
def
main
():
def
main
():
parser
=
ArgumentParser
(
description
=
DESCRIPTION
)
parser
=
ArgumentParser
(
description
=
__doc__
)
parser
.
add_argument
(
parser
.
add_argument
(
"
-u
"
,
"
--user
"
,
help
=
"
Login username
"
,
required
=
True
,
nargs
=
"
?
"
"
-u
"
,
"
--user
"
,
help
=
"
Login username
"
,
required
=
True
,
nargs
=
"
?
"
)
)
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
2
−
2
View file @
7eb9f7c9
#!/usr/bin/env python
#!/usr/bin/env python
from
setuptools
import
setup
,
find_packages
from
setuptools
import
setup
,
find_packages
from
check_mysql_slave
import
DESCRIPTION
from
check_mysql_slave
import
__doc__
as
description
setup
(
setup
(
name
=
"
check_mysql_slave
"
,
name
=
"
check_mysql_slave
"
,
version
=
open
(
"
VERSION
"
,
"
r
"
).
read
(),
version
=
open
(
"
VERSION
"
,
"
r
"
).
read
(),
description
=
DESCRIPTION
,
description
=
description
,
long_description
=
open
(
"
README.rst
"
,
"
r
"
).
read
(),
long_description
=
open
(
"
README.rst
"
,
"
r
"
).
read
(),
url
=
"
https://git.shore.co.il/nimrod/check_mysql_slave
"
,
url
=
"
https://git.shore.co.il/nimrod/check_mysql_slave
"
,
author
=
"
Nimrod Adar
"
,
author
=
"
Nimrod Adar
"
,
...
...
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