Skip to content

Commit

Permalink
Merge pull request #4097 from alephdata/release/4.0.3
Browse files Browse the repository at this point in the history
release/4.0.3 into release/4.1.0
  • Loading branch information
stchris authored Jan 10, 2025
2 parents ebde8d2 + 44e458a commit c820d5e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 20 deletions.
16 changes: 0 additions & 16 deletions aleph/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,12 @@
from werkzeug.local import LocalProxy
from werkzeug.middleware.profiler import ProfilerMiddleware

from aleph import __version__ as aleph_version
from aleph.settings import SETTINGS
from aleph.cache import Cache
from aleph.oauth import configure_oauth
from aleph.util import LoggingTransport
from aleph.metrics.flask import PrometheusExtension

import sentry_sdk
from sentry_sdk.integrations.flask import FlaskIntegration


NONE = "'none'"
log = logging.getLogger(__name__)
Expand Down Expand Up @@ -67,18 +63,6 @@ def create_app(config=None):
config = {}

configure_logging(level=logging.DEBUG)

if SETTINGS.SENTRY_DSN:
sentry_sdk.init(
dsn=SETTINGS.SENTRY_DSN,
integrations=[
FlaskIntegration(),
],
traces_sample_rate=0,
release=aleph_version,
environment=SETTINGS.SENTRY_ENVIRONMENT,
send_default_pii=False,
)
app = Flask("aleph")
app.config.from_object(SETTINGS)
app.config.update(config)
Expand Down
3 changes: 2 additions & 1 deletion aleph/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ def periodic(self):
delete_expired_exports()
delete_old_notifications()

self.run_indexing_batches()
if SETTINGS.STAGE_INDEX in SETTINGS.ALEPH_STAGES:
self.run_indexing_batches()
except Exception:
log.exception("Error while executing periodic tasks")

Expand Down
17 changes: 17 additions & 0 deletions aleph/wsgi.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
from aleph.core import create_app
from aleph.settings import SETTINGS
from aleph import __version__ as aleph_version

import sentry_sdk
from sentry_sdk.integrations.flask import FlaskIntegration


if SETTINGS.SENTRY_DSN:
sentry_sdk.init(
dsn=SETTINGS.SENTRY_DSN,
integrations=[
FlaskIntegration(),
],
traces_sample_rate=0,
release=aleph_version,
environment=SETTINGS.SENTRY_ENVIRONMENT,
send_default_pii=False,
)
app = create_app()
2 changes: 1 addition & 1 deletion helm/charts/aleph/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ name: aleph
description: Helm chart for Aleph
type: application
version: 4.1.0-rc4
appVersion: 4.1.0-rc4
appVersion: 4.1.0-rc4
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ followthemoney==3.5.9
followthemoney-store[postgresql]==3.1.0
followthemoney-compare==0.4.4
fingerprints==1.2.3
servicelayer[google,amazon]==1.23.2
servicelayer[google,amazon]==1.23.3-rc7
normality==2.5.0
pantomime==0.6.1

Expand Down Expand Up @@ -36,7 +36,7 @@ requests[security] >= 2.25.1, < 3.0.0
tabulate==0.9.0
zipstream-new==1.1.8
pika==1.3.2
sentry-sdk[flask]==2.10.0
sentry-sdk[flask]==2.19.2
prometheus-client==0.17.1


Expand Down

0 comments on commit c820d5e

Please sign in to comment.