Skip to content
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

Update anonlink to v0.12.5 #423

Merged
merged 5 commits into from
Oct 2, 2019
Merged

Update anonlink to v0.12.5 #423

merged 5 commits into from
Oct 2, 2019

Conversation

hardbyte
Copy link
Collaborator

@hardbyte hardbyte commented Sep 6, 2019

No description provided.

@hardbyte hardbyte requested review from wilko77 and removed request for wilko77 September 6, 2019 08:37
@hardbyte
Copy link
Collaborator Author

hardbyte commented Sep 7, 2019

Looks like a few changes are required...

Comment on lines -31 to +45
logger.info("Setting up entityservice worker")
logger.debug("Debug logging enabled")


@worker_process_init.connect()
def init_worker(**kwargs):
db_min_connections = Config.CELERY_DB_MIN_CONNECTIONS
db_max_connections = Config.CELERY_DB_MAX_CONNECTIONS
init_db_pool(db_min_connections, db_max_connections)
logger.info("Setting up worker process")
logger.debug("Debug logging enabled")


@worker_process_shutdown.connect()
def shutdown_worker(**kwargs):
close_db_pool()
logger.info("Shutting down a worker process")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated change: I moved these logs into the worker signal handlers as I saw the flask application was also logging them at import time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@gusmith gusmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good to go.

Comment on lines -31 to +45
logger.info("Setting up entityservice worker")
logger.debug("Debug logging enabled")


@worker_process_init.connect()
def init_worker(**kwargs):
db_min_connections = Config.CELERY_DB_MIN_CONNECTIONS
db_max_connections = Config.CELERY_DB_MAX_CONNECTIONS
init_db_pool(db_min_connections, db_max_connections)
logger.info("Setting up worker process")
logger.debug("Debug logging enabled")


@worker_process_shutdown.connect()
def shutdown_worker(**kwargs):
close_db_pool()
logger.info("Shutting down a worker process")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@hardbyte hardbyte merged commit c3a67ac into develop Oct 2, 2019
@hardbyte hardbyte deleted the update-anonlink branch October 2, 2019 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants