Skip to content

Commit

Permalink
Fix bug in datastore
Browse files Browse the repository at this point in the history
  • Loading branch information
zpriddy committed Apr 20, 2020
1 parent 5acc311 commit 8f34c1c
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs-src/glados.db.rst → docs-src/glados.datastore.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
DataStore
=========

.. automodule:: glados.db
.. automodule:: glados.datastore
:members:
:no-undoc-members:
:show-inheritance:
2 changes: 1 addition & 1 deletion docs-src/glados.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Modules
glados.bot
glados.configs
glados.core
glados.db
glados.datastore
glados.errors
glados.message_blocks
glados.plugin
Expand Down
2 changes: 1 addition & 1 deletion docs-src/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Modules
glados.bot
glados.configs
glados.core
glados.db
glados.datastore
glados.errors
glados.message_blocks
glados.plugin
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = glados
version = 0.0.1-dev23
version = 0.0.1-dev24
description = A library to help with slackbot development
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down
2 changes: 1 addition & 1 deletion src/glados/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def set_logging(level: str = None, format: str = None):

from .utils import PyJSON, get_var, get_enc_var

from .db import DataStore, DataStoreInteraction
from .datastore import DataStore, DataStoreInteraction
from .route_type import RouteType, EventRoutes, BOT_ROUTES, VERIFY_ROUTES
from .request import GladosRequest, SlackVerification
from .errors import (
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions src/glados/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ def set_interaction_from_datastore(self) -> NoReturn:

channel = container_payload.get("channel_id")
message_ts = container_payload.get("message_ts")
try:
massage_ts = datetime.fromtimestamp(float(message_ts))
except Exception as e:
logging.warning(f"error parsing message ts: {message_ts} : {e}")

if None in [channel, message_ts]:
logging.warning(
Expand Down

0 comments on commit 8f34c1c

Please sign in to comment.