diff --git a/src/flask_rq2/job.py b/src/flask_rq2/job.py index c003ebc..e7fcd83 100644 --- a/src/flask_rq2/job.py +++ b/src/flask_rq2/job.py @@ -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()