Skip to content
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

base64.b64encode method expects bytes as an argument #155

Closed
wants to merge 1 commit into from

Conversation

siteshwar
Copy link
Contributor

No description provided.

@@ -37,7 +37,7 @@ def handle_ticket(self, ticket_id):
# We know there's self._redis initialized by parent class so we don't
# create yet another connection.
redis_dict = self._redis.hgetall(redis_key)
ticket_data = base64.b64encode(redis_dict["data"])
ticket_data = base64.b64encode(bytes(redis_dict["data"], 'utf-8'))
Copy link
Owner

Choose a reason for hiding this comment

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

I need to take a look ... it feels weird taking a string, encoding it tu utf, and then base64... we do something wrong

praiskup added a commit that referenced this pull request Mar 14, 2024
The base64 encoding is worth doing on the dispatcher side, and store
strings to Redis, instead of decoding and encoding it once more in
worker (see #155).

Fixes: #155
praiskup added a commit that referenced this pull request Mar 14, 2024
The base64 encoding is worth doing on the dispatcher side, and store
strings to Redis, instead of decoding and encoding it once more in
worker (see #155).

Fixes: #155, #156
praiskup added a commit that referenced this pull request Mar 14, 2024
The base64 encoding is worth doing on the dispatcher side, and store
strings to Redis, instead of decoding and encoding it once more in
worker (see #155).

Fixes: #155, #156
praiskup added a commit that referenced this pull request Mar 15, 2024
The base64 encoding is worth doing on the dispatcher side, and store
strings to Redis, instead of decoding and encoding it once more in
worker (see #155).

Fixes: #155, #156
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.

2 participants