Skip to content

Commit

Permalink
Merge 96eaf9f into 3c1fb59
Browse files Browse the repository at this point in the history
  • Loading branch information
xgaia committed Nov 8, 2019
2 parents 3c1fb59 + 96eaf9f commit 51c9e83
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
8 changes: 7 additions & 1 deletion askomics/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@

from flask_reverse_proxy_fix.middleware import ReverseProxyPrefixFix

from pkg_resources import get_distribution

import sentry_sdk
from sentry_sdk.integrations.flask import FlaskIntegration
from sentry_sdk.integrations.celery import CeleryIntegration

__all__ = ('create_app', 'create_celery')

Expand Down Expand Up @@ -74,9 +77,12 @@ def create_app(config='config/askomics.ini', app_name='askomics', blueprints=Non
pass

if sentry_dsn:
version = get_distribution('askomics').version
name = get_distribution('askomics').project_name
sentry_sdk.init(
dsn=sentry_dsn,
integrations=[FlaskIntegration()]
release="{}@{}".format(name, version),
integrations=[FlaskIntegration(), CeleryIntegration()]
)

app = Flask(app_name, static_folder='static', template_folder='templates')
Expand Down
6 changes: 5 additions & 1 deletion askomics/react/src/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react'
import ReactDOM from 'react-dom'
import * as Sentry from '@sentry/browser'
import packageJson from '../../../package.json';

import Routes from './routes'

Expand All @@ -15,7 +16,10 @@ class App extends React.Component {

let sentry = document.getElementById('sentry').getAttribute('sentry')
if (sentry != "") {
Sentry.init({dsn: sentry});
Sentry.init({
dsn: sentry,
release: packageJson.name + "@" + packageJson.version
});
}

ReactDOM.render(<App/>, document.getElementById('app'))
4 changes: 4 additions & 0 deletions askomics/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def integrate(self, session, data, host_url):
dataset.update_in_db("failure", error=True, error_message=str(e), traceback=trace)
# Rollback
file.rollback()
raise e
return {
'error': True,
'errorMessage': str(e)
Expand Down Expand Up @@ -116,6 +117,7 @@ def delete_datasets(self, session, datasets_info):

except Exception as e:
traceback.print_exc(file=sys.stdout)
raise e
return {
'error': True,
'errorMessage': str(e)
Expand Down Expand Up @@ -172,6 +174,7 @@ def query(self, session, info):
trace = traceback.format_exc()
result.update_db_status("error", error=True, error_message=str(e), traceback=trace)
result.rollback()
raise e
return {
'error': True,
'errorMessage': str(e)
Expand Down Expand Up @@ -228,6 +231,7 @@ def sparql_query(self, session, info):
traceback.print_exc(file=sys.stdout)
trace = traceback.format_exc()
result.update_db_status("error", error=True, error_message=str(e), traceback=trace)
raise e
return {
'error': True,
'errorMessage': str(e)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"ontology"
],
"name": "AskOmics",
"version": "3.1.3",
"version": "3.1.4",
"description": "Visual SPARQL query builder",
"author": "Xavier Garnier",
"license": "AGPL-3.0",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='askomics',
version='3.1.3',
version='3.1.4',
description='''
AskOmics is a visual SPARQL query interface supporting both intuitive
data integration and querying while shielding the user from most of the
Expand Down

0 comments on commit 51c9e83

Please sign in to comment.