Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ wheels/
*.egg-info/
.installed.cfg
*.egg
*.swp

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down Expand Up @@ -104,4 +105,4 @@ certs/
.DS_Store
tmp/
# redis
dump.rdb
dump.rdb
10 changes: 10 additions & 0 deletions bin/bbox.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
from typing import Optional, List
import sys
import os
import logging
import signal
import signal
Expand All @@ -9,6 +10,8 @@
from aiobbox.log import config_log
from aiobbox.handler import BaseHandler
from aiobbox.utils import import_module
import sentry_sdk
from sentry_sdk.integrations.aiohttp import AioHttpIntegration

sys.path.append('.')

Expand Down Expand Up @@ -56,6 +59,13 @@ def run(top_parser:ArgumentParser, input_args:Optional[List[str]]=None) -> None:
args = top_parser.parse_args(input_args)
loop = asyncio.get_event_loop()

sentry_url = os.environ.get('SENTRY_URL')
if sentry_url:
sentry_sdk.init(
dsn=sentry_url,
integrations=[AioHttpIntegration()]
)

handler = getattr(args, 'handler', None)
if handler is None:
top_parser.print_help()
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from setuptools import find_packages

setup(name='aiobbox',
version='0.5.5',
version='0.5.6',
description='multi-lang, highly available rpc framework',
author='Zeng Ke',
author_email='[email protected]',
Expand All @@ -27,6 +27,8 @@
'netifaces',
'aioredis',
'etcd3-py',
'aiocontextvars',
'sentry-sdk',
],
python_requires='>=3.6',
)