Skip to content

Commit

Permalink
minor: redis data backend add log (#13)
Browse files Browse the repository at this point in the history
* minor: redis data backend add log
  • Loading branch information
homholueng authored Sep 22, 2021
1 parent 64eecd3 commit 721b47d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/bamboo-pipeline/pipeline/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

default_app_config = "pipeline.apps.PipelineConfig"

__version__ = "3.7.0"
__version__ = "3.7.1"
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@
"""

import pickle
import logging

from pipeline.conf import settings
from pipeline.engine.core.data.base_backend import BaseDataBackend

logger = logging.getLogger("celery")


class RedisDataBackend(BaseDataBackend):
def set_object(self, key, obj):
Expand All @@ -24,6 +27,9 @@ def set_object(self, key, obj):
def get_object(self, key):
pickle_str = settings.redis_inst.get(key)
if not pickle_str:
logger.warning(
"[RedisDataBackend.get_object]redis(%s) get %s return %s" % (str(settings.redis_inst), key, pickle_str)
)
return None
return pickle.loads(pickle_str)

Expand Down
5 changes: 5 additions & 0 deletions runtime/bamboo-pipeline/release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 3.7.1

- minor:
- add redis bakckend log

# 3.7.0

- feature:
Expand Down

0 comments on commit 721b47d

Please sign in to comment.