-
Notifications
You must be signed in to change notification settings - Fork 8
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
PPS 2021 refactor #60
Changes from 1 commit
0895e0a
a0593c2
3f5e8f8
b0c5bad
e5a06d5
14ecd8f
a950ad8
a89cd52
744f818
020c5d0
024e4d7
2c4fa7d
509319f
a78d2f8
62c1440
40f1a39
f989714
642e49b
ab3facf
458a652
8e85405
4834af2
59c584e
85ab48a
130bf2e
c926143
5354d27
2d2bb56
fe4f759
94c040d
c048243
45da179
f863d70
4070de4
1b1e4d4
5bc5720
f68f7af
29df5ec
1bde12c
f520c0e
a1bd874
1f6f8ba
c22870c
13bb3d2
c977117
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 |
---|---|---|
|
@@ -51,7 +51,7 @@ def run(self): | |
LOG.debug("Subscribe topics = %s", str(self.subscribe_topics)) | ||
with posttroll.subscriber.Subscribe("", self.subscribe_topics, True) as subscr: | ||
|
||
for msg in subscr.recv(timeout=90): | ||
for msg in subscr.recv(): | ||
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. Not sure why we had a timeout of 90 seconds before, but is it safe to change this? Why was this needed? 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. I removed it because the patched subscriber did not have the timeout keyword. I am not sure if it is safe to remove. 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. The timeout is needed I think when the thread is shut down. Maybe something we need in the patched_subscriber then. |
||
if not self.loop: | ||
break | ||
|
||
|
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.
Is this working in 3.12?
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.
Yes, the datetime.datetime.now(datetime.UTC) is working in python 3.12 but in 3.9 I get
AttributeError: module 'datetime' has no attribute 'UTC'
. The datetime.datetime.now(datetime.UTC) will also need some changes in other parts of the code as it is not expecting timezone-aware objects. Currently I get a warning in 3.12:DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).