Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Messenger Interface rework #357
base: dev
Are you sure you want to change the base?
Messenger Interface rework #357
Changes from 42 commits
70306f4
af90b04
9d7ecf0
0c377f1
8360976
8476b16
4d83016
2e0dedc
93b5359
d759fba
01b0002
52eb5bf
88753a8
5f98eda
591bd8f
fd89b12
98a13b4
9889199
e956cc3
e238432
1f88e47
97cec27
e601ed6
7d8c68c
8ebf6ec
e366a61
09fe10f
0cecb80
1c24131
b49dac7
876ce8d
f91910b
585a37d
4180e17
0059bd3
c3f18a7
65329f8
30369f6
ce9ac81
c765c18
83ebe7f
b99c4eb
8715c2f
a829cf5
16b049a
a8607c6
5656437
cd16255
3282d18
b2140a5
6fde6c3
2529537
6334b8e
9a2381a
b8c99d9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Do we need this method?
Maybe pipeline should create a task from the interface and await on it on its own?
We are going to add support for multiple messenger interfaces and I think that interfaces for using one or multiple ifaces shouldn't differ.
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.
I'm for removing it, but not sure how to do this properly. Let's say this code is moved to
pipeline.py
, whereconnect()
will be called froma_run()
. Then tests will want to callconnect()
if they want to pass parameters, which means all code inpipeline.a_run()
will be bypassed. Basically, we're not giving the user an option to both run code frompipeline.run
and pass their parameters intoconnect()
.What if all those parameters will be passed in
MessengerInterface
constructor parameters? Not sure though, these parameters don't really look like constructor parameters, it looks a bit off. If we do go through with this, Pydantic'sBaseModel
may be useful.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.
Add comments on why we need to sleep.
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.
I'm not sure why myself. I think it's to set
self.running
to False fromshutdown
method, ending thepolling_loop
. I'll try to change that line toself.running = False
and see what happensThere 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.
Maybe make Messenger Interfaces
BaseModel
to make handling these flags easier?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.
Does
to_thread
work?Clean up this code.
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.
It doesn't. It just goes into an infinite cycle with no outputs. I guess I could look through logs file, but I haven't done it yet.