Skip to content

Conversation

congoamz
Copy link
Contributor

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@@ -11,13 +11,3 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what happened with git here, but I deleted subscribed_method_utils.py and moved the SubscribedMethodUtils class to aws_wrapper/utils/utils.py instead, then added this separate init.py file to unit_testing/utils/

Copy link
Contributor

Choose a reason for hiding this comment

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

This is weird. Do we really need this file at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question, according to this source init.py used to be required to mark packages as python packages, even if it was empty. But starting with Python 3.3 they aren't required anymore. I'll leave this in since we have blank ones in most/all our packages but we could consider creating a PR to remove the empty ones

@congoamz congoamz requested review from karenc-bq, justing-bq and joyc-bq and removed request for karenc-bq July 27, 2023 18:03
from threading import Lock


class AtomicInt:
Copy link
Contributor

Choose a reason for hiding this comment

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

Does there already exist a library that can do this for us?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looked around, found this. Looks like you can use pypy but it looks like pypy is a different implementation of python instead of just a library. Not sure if we want to switch to get their implementation. Maybe we could create another task to investigate if it is viable or if there is a different library out there

@@ -11,13 +11,3 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is weird. Do we really need this file at all?

delay_ms = Monitor._INACTIVE_SLEEP_MS
else:
# Subtract the time taken for the status check from the delay
delay_ms -= status.elapsed_time_ns
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it makes sense to minus nanoseconds from milliseconds? Wouldn't we have something like 500 ms - 100,000,000,000 ns?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. The JDBC code does not convert either so we'll need to fix it there

Copy link
Contributor

@karenc-bq karenc-bq left a comment

Choose a reason for hiding this comment

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

Approved with nits

@congoamz congoamz merged commit c28a062 into main Aug 9, 2023
@congoamz congoamz deleted the monitor branch August 9, 2023 22:33
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.

6 participants