Skip to content

Commit

Permalink
merged PR rq#90 from flask-rq2
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-takumi committed Feb 23, 2023
1 parent d6b4f99 commit 131b469
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/flask_rq2/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,7 @@ def __init__(self, *args, **kwargs):
super(FlaskJob, self).__init__(*args, **kwargs)
self.script_info = ScriptInfo()

def load_app(self):
if current_app:
app = current_app
else:
app = self.script_info.load_app()
return app

def perform(self):
app = self.load_app()
app = self.script_info.load_app()
with app.app_context():
return super(FlaskJob, self).perform()

0 comments on commit 131b469

Please sign in to comment.