Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
hivemind
Commits
a1044d4d
Commit
a1044d4d
authored
6 years ago
by
roadscape
Browse files
Options
Downloads
Patches
Plain Diff
log and conf tidy
parent
3cb4d260
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
hive/cli.py
+4
-0
4 additions, 0 deletions
hive/cli.py
hive/db/adapter.py
+2
-0
2 additions, 0 deletions
hive/db/adapter.py
hive/db/schema.py
+0
-9
0 additions, 9 deletions
hive/db/schema.py
hive/server/serve.py
+0
-5
0 additions, 5 deletions
hive/server/serve.py
with
6 additions
and
14 deletions
hive/cli.py
+
4
−
0
View file @
a1044d4d
...
...
@@ -2,11 +2,15 @@
"""
CLI service router
"""
import
logging
from
hive.conf
import
Conf
from
hive.db.db_state
import
DbState
from
hive.indexer.sync
import
Sync
from
hive.server.serve
import
run_server
logging
.
basicConfig
()
def
run
():
"""
Run the proper routine as indicated by hive --mode argument.
"""
...
...
This diff is collapsed.
Click to expand it.
hive/db/adapter.py
+
2
−
0
View file @
a1044d4d
...
...
@@ -9,6 +9,8 @@ import sqlalchemy
from
hive.conf
import
Conf
from
hive.utils.stats
import
log_query_stats
logging
.
getLogger
(
'
sqlalchemy.engine
'
).
setLevel
(
logging
.
WARNING
)
log
=
logging
.
getLogger
(
__name__
)
class
Db
:
...
...
This diff is collapsed.
Click to expand it.
hive/db/schema.py
+
0
−
9
View file @
a1044d4d
"""
Db schema definitions and setup routines.
"""
import
logging
import
sqlalchemy
as
sa
from
sqlalchemy.sql
import
text
as
sql_text
from
sqlalchemy.types
import
SMALLINT
...
...
@@ -10,17 +8,10 @@ from sqlalchemy.types import VARCHAR
from
sqlalchemy.types
import
TEXT
from
sqlalchemy.types
import
BOOLEAN
#from hive.conf import Conf
from
hive.db.adapter
import
Db
#pylint: disable=line-too-long, too-many-lines
logging
.
basicConfig
()
#if Conf.get('log_level') == 'INFO': # ultra-verbose
# logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO)
logging
.
getLogger
(
'
sqlalchemy.engine
'
).
setLevel
(
logging
.
WARNING
)
def
build_metadata
():
"""
Build schema def with SqlAlchemy
"""
metadata
=
sa
.
MetaData
()
...
...
This diff is collapsed.
Click to expand it.
hive/server/serve.py
+
0
−
5
View file @
a1044d4d
...
...
@@ -163,8 +163,3 @@ def run_server():
app
.
router
.
add_post
(
'
/
'
,
jsonrpc_handler
)
web
.
run_app
(
app
,
port
=
app
[
'
config
'
][
'
args
'
][
'
http_server_port
'
])
if
__name__
==
'
__main__
'
:
Conf
.
init_argparse
()
run_server
()
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