Skip to content
Snippets Groups Projects
Commit 28423b69 authored by roadscape's avatar roadscape
Browse files

adjust sync log levels

parent aa15d55b
No related branches found
No related tags found
No related merge requests found
...@@ -180,8 +180,8 @@ class Db: ...@@ -180,8 +180,8 @@ class Db:
Stats.log_db(sql, perf() - start) Stats.log_db(sql, perf() - start)
return result return result
except Exception as e: except Exception as e:
log.error("[SQL-ERR] %s in query %s (%s)", log.info("[SQL-ERR] %s in query %s (%s)",
e.__class__.__name__, sql, kwargs) e.__class__.__name__, sql, kwargs)
raise e raise e
@staticmethod @staticmethod
......
...@@ -102,14 +102,8 @@ def run_server(conf): ...@@ -102,14 +102,8 @@ def run_server(conf):
try: try:
return await hive_api.db_head_state() return await hive_api.db_head_state()
except OperationalError as e: except OperationalError as e:
if 'could not connect to server: Connection refused' in str(e): if conf.get('sync_to_s3'):
log.warning("could not get head state (connection refused)") log.info("could not get head state (%s)", e)
return None
if 'the database system is shutting down' in str(e):
log.warning("could not get head state (db shutting down)")
return None
if 'terminating connection due to administrator command' in str(e):
log.warning("could not get head state (admin terminated)")
return None return None
raise e raise e
......
...@@ -61,8 +61,8 @@ class BlockSchedule: ...@@ -61,8 +61,8 @@ class BlockSchedule:
self._last_date = date self._last_date = date
else: else:
self._drift_backward() self._drift_backward()
log.warning("block %d not available. head:%s drift:%fs", log.info("block %d not available. head:%s drift:%fs",
num, self._head_num, self._drift) num, self._head_num, self._drift)
def _check_head_date(self, num, date): def _check_head_date(self, num, date):
"""Sanity-checking of head block date. """Sanity-checking of head block date.
......
...@@ -77,7 +77,7 @@ echo hivemind: starting server ...@@ -77,7 +77,7 @@ echo hivemind: starting server
if [[ ! "$SYNC_TO_S3" ]]; then if [[ ! "$SYNC_TO_S3" ]]; then
exec "${POPULATE_CMD}" server exec "${POPULATE_CMD}" server
else else
exec "${POPULATE_CMD}" server 2>&1& exec "${POPULATE_CMD}" server --log-level=warning 2>&1&
mkdir -p /etc/service/hivesync mkdir -p /etc/service/hivesync
cp /usr/local/bin/hivesync.sh /etc/service/hivesync/run cp /usr/local/bin/hivesync.sh /etc/service/hivesync/run
chmod +x /etc/service/hivesync/run chmod +x /etc/service/hivesync/run
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment