Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
beem
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
Container Registry
Model registry
Operate
Environments
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
hive
beem
Commits
35a89b8e
Commit
35a89b8e
authored
6 years ago
by
crokkon
Browse files
Options
Downloads
Patches
Plain Diff
Conveyor: adding healthcheck
parent
85930ddb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
beem/conveyor.py
+18
-0
18 additions, 0 deletions
beem/conveyor.py
with
18 additions
and
0 deletions
beem/conveyor.py
+
18
−
0
View file @
35a89b8e
...
@@ -15,6 +15,10 @@ from .instance import shared_steem_instance
...
@@ -15,6 +15,10 @@ from .instance import shared_steem_instance
from
.account
import
Account
from
.account
import
Account
from
beemgraphenebase.py23
import
py23_bytes
from
beemgraphenebase.py23
import
py23_bytes
from
beemgraphenebase.ecdsasig
import
sign_message
from
beemgraphenebase.ecdsasig
import
sign_message
try
:
from
urllib.parse
import
urljoin
except
ImportError
:
from
urlparse
import
urljoin
class
Conveyor
(
object
):
class
Conveyor
(
object
):
...
@@ -264,6 +268,7 @@ class Conveyor(object):
...
@@ -264,6 +268,7 @@ class Conveyor(object):
return
self
.
_conveyor_method
(
account
,
None
,
return
self
.
_conveyor_method
(
account
,
None
,
"
conveyor.list_drafts
"
,
"
conveyor.list_drafts
"
,
[
account
[
'
name
'
]])
[
account
[
'
name
'
]])
def
remove_draft
(
self
,
account
,
uuid
):
def
remove_draft
(
self
,
account
,
uuid
):
"""
Remove a draft from the Conveyor database
"""
Remove a draft from the Conveyor database
...
@@ -276,3 +281,16 @@ class Conveyor(object):
...
@@ -276,3 +281,16 @@ class Conveyor(object):
return
self
.
_conveyor_method
(
account
,
None
,
return
self
.
_conveyor_method
(
account
,
None
,
"
conveyor.remove_draft
"
,
"
conveyor.remove_draft
"
,
[
account
[
'
name
'
],
uuid
])
[
account
[
'
name
'
],
uuid
])
def
healthcheck
(
self
):
"""
Get the Conveyor status
Sample output:
`{
'
ok
'
: True,
'
version
'
:
'
1.1.1-4d28e36-1528725174
'
,
'
date
'
:
'
2018-07-21T12:12:25.502Z
'
}`
"""
url
=
urljoin
(
self
.
url
,
"
/.well-known/healthcheck.json
"
)
r
=
requests
.
get
(
url
)
return
r
.
json
()
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