-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
22948 - update emailer to use new db versioning #3092
Changes from all commits
3081a36
95dd3b2
660dc68
ec76671
c3a23fc
b1775c4
703876c
e377ba2
4871305
2582c73
ce1730e
b60700b
610956b
6812e79
82e42c8
8c0c062
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,4 +60,4 @@ reportlab==3.6.12 | |
html-sanitizer==2.4.1 | ||
lxml==5.2.2 | ||
git+https://github.com/bcgov/[email protected]#egg=registry_schemas | ||
git+https://github.com/bcgov/lear.git#egg=sql-versioning&subdirectory=python/common/sql-versioning | ||
git+https://github.com/bcgov/lear.git#egg=sql-versioning&subdirectory=python/common/sql-versioning |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,18 @@ | ||
{ | ||
"flagValues": { | ||
"disable-specific-service-provider": true | ||
"disable-specific-service-provider": true, | ||
"db-versioning": { | ||
"legal-api": true, | ||
"emailer": true, | ||
"filer": false, | ||
"entity-bn": false, | ||
"digital-credentials": false, | ||
"dissolutions-job": false, | ||
"furnishings-job": false, | ||
"emailer-reminder-job": false, | ||
"future-effective-job": false, | ||
"update-colin-filings-job": false, | ||
"update-legal-filings-job": false | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,7 +67,7 @@ rsa==4.7.2 | |
semver==2.13.0 | ||
sentry-sdk==1.20.0 | ||
six==1.15.0 | ||
SQLAlchemy==1.3.24 | ||
SQLAlchemy==1.4.44 | ||
SQLAlchemy-Continuum==1.3.13 | ||
SQLAlchemy-Utils==0.37.1 | ||
strict-rfc3339==0.7 | ||
|
@@ -79,6 +79,11 @@ Werkzeug==1.0.1 | |
yarl==1.8.2 | ||
zipp==3.15.0 | ||
git+https://github.com/bcgov/[email protected]#egg=registry_schemas | ||
git+https://github.com/bcgov/lear.git#egg=legal_api&subdirectory=legal-api | ||
|
||
# install updated legal-api from feature branch for development, | ||
# TODO - change it back when the db versioning feature branch merged to main | ||
git+https://github.com/bcgov/lear.git@feature-db-versioning#egg=legal_api&subdirectory=legal-api | ||
# git+https://github.com/bcgov/lear.git#egg=legal_api&subdirectory=legal-api | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @leodube-aot how about the legal-api package, installing from the feature branch? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup we'll be installing the legal-api package from the feature branch |
||
|
||
git+https://github.com/bcgov/lear.git#egg=entity_queue_common&subdirectory=queue_services/common | ||
git+https://github.com/bcgov/lear.git#egg=sql-versioning&subdirectory=python/common/sql-versioning |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ | |
from entity_queue_common.service import QueueServiceManager | ||
from entity_queue_common.service_utils import EmailException, QueueException, logger | ||
from flask import Flask | ||
from legal_api import db | ||
from legal_api import db, init_db # noqa:F401,I001;pylint:disable=unused-import; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Didn't remove the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's interesting is that you can remove this unused |
||
from legal_api.models import Filing, Furnishing | ||
from legal_api.services.bootstrap import AccountService | ||
from legal_api.services.flags import Flags | ||
|
@@ -65,14 +65,14 @@ | |
) | ||
|
||
from .message_tracker import tracker as tracker_util | ||
|
||
# noqa:I003 | ||
|
||
qsm = QueueServiceManager() # pylint: disable=invalid-name | ||
flags = Flags() # pylint: disable=invalid-name | ||
APP_CONFIG = config.get_named_config(os.getenv('DEPLOYMENT_ENV', 'production')) | ||
FLASK_APP = Flask(__name__) | ||
FLASK_APP.config.from_object(APP_CONFIG) | ||
db.init_app(FLASK_APP) | ||
init_db(FLASK_APP) | ||
|
||
if FLASK_APP.config.get('LD_SDK_KEY', None): | ||
flags.init_app(FLASK_APP) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,7 +58,9 @@ class _Config(): # pylint: disable=too-few-public-methods | |
""" | ||
|
||
# PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
|
||
# used to identify versioning flag | ||
SERVICE_NAME = 'emailer' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As per discussion using flag |
||
SQLALCHEMY_TRACK_MODIFICATIONS = False | ||
|
||
# POSTGRESQL | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update the SQLAlchemy version to make it compatible with the custom sql-versioning