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

request update to authenticate method. #143

Open
alvhernandez opened this issue Nov 1, 2024 · 1 comment
Open

request update to authenticate method. #143

alvhernandez opened this issue Nov 1, 2024 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@alvhernandez
Copy link

Hi , Atlassian send us a recommendation to improve the login connection, because, if the script cycle is over 130.000 registres, the communication is closed by peer, this is the script to improve the connection.

This is for attachments, we have a hi quatity of elements to migrate 👍

how time you/yours get to improve this conecction?

This is the code atlassian send us

import logging
import sys
from jira import JIRA
from requests.adapters import HTTPAdapter

logging.basicConfig(
level=logging.DEBUG,
format='%(asctime)s %(levelname)s %(message)s',
handlers=[logging.StreamHandler(sys.stdout)]
)

logging.getLogger('requests').setLevel(logging.DEBUG)
logging.getLogger('urllib3').setLevel(logging.DEBUG)

class LoggingHTTPAdapter(HTTPAdapter):
def send(self, request, kwargs):
print(f"Full URL: {request.url}")
return super().send(request, kwargs)
jira = JIRA(
server='https://
*****.atlassian.net',
basic_auth=('email', 'key')
)

session = jira._session
session.mount('http://', LoggingHTTPAdapter())
session.mount('https://', LoggingHTTPAdapter())

attachment_id = ********
attachment = jira.attachment(attachment_id)

print(f"Attachment filename: {attachment.filename}")
print(f"Attachment size: {attachment.size}")
print(f"Attachment content URL: {attachment.content}")

@princenyeche princenyeche self-assigned this Nov 1, 2024
@princenyeche princenyeche added the question Further information is requested label Nov 1, 2024
@princenyeche
Copy link
Owner

Hey @alvhernandez

I believe this is the question you're asking, correct me if I'm wrong.

How much time will it take to implement this improvement on our end?

First, you need to understand such implementation then you can estimate the time you need. However, can you elaborate what help you require from jiraone? Are you using jiraone's script to update something within your site? If yes, then please add more context to your question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants