Skip to content

Commit

Permalink
Merge pull request #428 from albertyw/remove-deprecated-before-first-…
Browse files Browse the repository at this point in the history
…request

Remove deprecated flask before_first_request
  • Loading branch information
brianr authored Jul 4, 2023
2 parents e3e1595 + ab133b5 commit 029095f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rollbar/examples/flask/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
app = Flask(__name__)


@app.before_first_request
def init_rollbar():
with app.app_context():
rollbar.init('ACCESS_TOKEN', environment='development')
# send exceptions from `app` to rollbar, using flask's signal system.
got_request_exception.connect(rollbar.contrib.flask.report_exception, app)
Expand Down

0 comments on commit 029095f

Please sign in to comment.