-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 Async Background Thread transport #1942
Add Async Background Thread transport #1942
Conversation
Actually I think I should add the Base transport class, will add that quickly first... |
d0e8da2
to
f5b9da5
Compare
Added base Transport class, Travis passes, review/merge at your convenience. |
entries on a background :class:`python.threading.Thread`. | ||
|
||
1. :class:`gcloud.logging.handlers.SyncTransport` this handler does a direct API call on each | ||
logging statement to writ the entry. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
d6b9658
to
9e30584
Compare
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
@tseaver was waiting for review/merge, I just rebased it onto origin/master but now it thinks all those commits are mine. Not sure how to fix? |
CLAs look good, thanks! |
a6bc526
to
61c88a6
Compare
@tseaver ok i rebased it, i was trying to merge upstream but I think I did that wrong and I'll just hold off on it for now. Travis is now failing the lint but looks like origin/master is too so I'm guessing it's not related to this PR. |
@waprin, we've been battling with pylint and a few things. I think if you rebase again, it will fix this lint error in travis. |
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
@waprin Yay! |
@daspecster yes thanks for help. System tests are failing so will fix that then ping for review |
0576f1d
to
a62781c
Compare
http) | ||
logger = self.client.logger(name) | ||
self.worker = _Worker(logger) | ||
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@daspecster ready for another review at your convenience, just mentioned yo in another comment about the need for the class to copy the client. |
while not self.stopping: | ||
if len(self.batch.entries) == 0: | ||
# branch coverage of this code extremely flaky | ||
self._entries_condition.wait() # pragma: NO COVER |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
So where are we leaving off with this? |
I'm too out of the loop to comment |
@tseaver ping |
@tseaver @dhermes @daspecster Been almost a month, would like this to get merged and the feature branch to get merged into master, what's going on? |
@daspecster : Can you take a look? |
I'll merge if we're good to go? |
Refactors handlers into separate package Adds background threaded transport Adds fix to Batch commit to properly set log name
Had to kill shebang (since realized it's a bad thing to have in default template), but after Travis passes we can merge. This is still just into a feature branch so we can still have Tres take a final pass before merge into master. |
Traceback (most recent call last): 😢 |
Ugh. That dependency is restored on |
I merged |
... and the bulid is green. Whew! |
@@ -0,0 +1,7 @@ | |||
Python Logging Handler Sync Transport | |||
====================================== |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Thanks, will fix those issues in final commit before I aim for a master merge (fluentd handler). |
Next step: asynchronous transport using a background thread.
Some notes:
Next handler up will be fluentd.