-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add total order #10
Add total order #10
Conversation
secondary/app.py
Outdated
tr_id = [] | ||
lock = Lock() | ||
|
||
|
||
def extract_data(data: dict): | ||
result = [data[i] for i in sorted(data)] |
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.
sorted_data_id
can be reused here
secondary/app.py
Outdated
@@ -28,15 +40,16 @@ def post(): | |||
msg = request.json.get("message") | |||
with lock: | |||
if not id in tr_id: |
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.
can be replaced with if id not in tr_id
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.
Please, resolve open comments. Once you're done, ping me, I'll try to investigate tests and cover the new logic with tests (of course, it would be great if you tried to do it on your own).
No description provided.