refactor(resolved_tasks):add secrets to the .env
This commit is contained in:
parent
d73a2da3e6
commit
27166314af
@ -1,6 +1,7 @@
|
||||
certifi==2023.11.17
|
||||
charset-normalizer==3.3.2
|
||||
idna==3.4
|
||||
dotenv==1.0.1
|
||||
requests==2.31.0
|
||||
setuptools==69.0.0
|
||||
six==1.16.0
|
||||
|
@ -5,8 +5,11 @@ import sys
|
||||
import requests
|
||||
|
||||
|
||||
from dotenv import load_dotenv
|
||||
from logging_config import setup_logging
|
||||
|
||||
load_dotenv()
|
||||
|
||||
logger = setup_logging(__name__)
|
||||
|
||||
base_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
@ -18,14 +21,14 @@ sys.stdout.reconfigure(encoding='utf-8')
|
||||
|
||||
|
||||
QUEUE_NAME = 'TESTIMPORT'
|
||||
|
||||
TOKEN = os.getenv('TOKEN')
|
||||
|
||||
def close_tasks_in_queue(queue_name):
|
||||
base_url = 'https://api.tracker.yandex.net/v2/issues/_search'
|
||||
# base_url = 'https://api.tracker.yandex.net/v2/issues/_search?expand=transitions'
|
||||
headers = {
|
||||
'Host': 'api.tracker.yandex.net',
|
||||
'Authorization': 'OAuth y0_AgAEA7qkB3KjAArkXwAAAADzMlP9oR1lwMzBS2e94jHzdnII8Laxi7k',
|
||||
'Authorization': TOKEN,
|
||||
'X-Org-ID': '7095769',
|
||||
'Content-Type': 'application/json',
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user