Skip to content

A570218846721951 health check#26

Open
Scandie wants to merge 8 commits intoopenprocurement:eauctions-sandboxfrom
Scandie:a570218846721951_health_check
Open

A570218846721951 health check#26
Scandie wants to merge 8 commits intoopenprocurement:eauctions-sandboxfrom
Scandie:a570218846721951_health_check

Conversation

@Scandie
Copy link
Copy Markdown
Collaborator

@Scandie Scandie commented Mar 2, 2018

No description provided.

@coveralls
Copy link
Copy Markdown

coveralls commented Mar 5, 2018

Coverage Status

Coverage increased (+3.4%) to 88.807% when pulling e54d16b on Scandie:a570218846721951_health_check into 3acd616 on openprocurement:eauctions-sandbox.

Copy link
Copy Markdown
Collaborator

@yarsanich yarsanich left a comment

Choose a reason for hiding this comment

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

Я б зробив init_services методом воркера і поділив його ще не три метода, або утиліти на чек кожного сервісу.

Comment thread openprocurement/auction/worker/cli.py Outdated
auction_data=auction_data,
lot_id=args.lot)
if args.cmd == 'check':
exit()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

sys.exit()?

Comment thread openprocurement/auction/worker/utils.py Outdated
logging.addLevelName(25, 'CHECK')


def check(self, msg, exc=None, *args, **kwargs):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Docstring

Comment thread openprocurement/auction/worker/utils.py Outdated
return pause


def init_services(auction):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Можливо варто щоб init_sevices був методом самого воркера ?

Comment thread openprocurement/auction/worker/utils.py Outdated
auction.session_ds = RequestsSession()
LOGGER.check('{} - {}'.format("API", result[0]), result[1])

# Checking CouchDB availability
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Тобі не виглядає, що ці три коментарі, на ініт кожного сервіса, можна винести в окремий метод, може так буде краще виглядати і зрозуміліше що відбувається ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Протестувати окремо можна буде.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Думав над таким варіантом, ок, повиношу.

Scandie added 2 commits March 5, 2018 17:11
 * Split init_services to separate init methods for each service
 * Replace exit() call wit sys.exit()
 * Add tests for InitializeServiceMixin
logging.addLevelName(25, 'CHECK')


def check(self, msg, exc=None, *args, **kwargs):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

А її хіба не можна імпортувати ?

from urlparse import urljoin

import iso8601
from couchdb import Server, Session
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

make this right PEP 8

 * Reorganize import statements
@Scandie Scandie force-pushed the a570218846721951_health_check branch from cd22b46 to 7dfb9e5 Compare March 7, 2018 14:51
@Scandie
Copy link
Copy Markdown
Collaborator Author

Scandie commented Mar 12, 2018

@Scandie Scandie force-pushed the a570218846721951_health_check branch from 6d20e3e to 95148c9 Compare September 12, 2018 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants