refactor(mapping)delete unusable strings

This commit is contained in:
Angelina Tingaeva 2023-12-04 11:30:59 +05:00
parent 7613b7da06
commit 007ca43a43
2 changed files with 6 additions and 10 deletions

View File

@ -1,5 +1,10 @@
import logging import logging
import logging.handlers import logging.handlers
import sys
sys.stdin.reconfigure(encoding='utf-8')
sys.stdout.reconfigure(encoding='utf-8')
def setup_logging(name): def setup_logging(name):
@ -12,9 +17,7 @@ def setup_logging(name):
file_handler = logging.FileHandler( file_handler = logging.FileHandler(
filename=f"{name}.log", filename=f"{name}.log",
mode='w', mode='w',
encoding="UTF-8" encoding='utf-8'
#maxBytes=1024*1024,
#backupCount=5
) )
file_handler.setLevel(logging.DEBUG) file_handler.setLevel(logging.DEBUG)

View File

@ -2,13 +2,10 @@ import csv
import json import json
import os import os
import sys import sys
# import logging
import requests import requests
# logging.basicConfig(level=logging.DEBUG, filename='mapping.log', filemode='w')
from logging_config import setup_logging from logging_config import setup_logging
logger = setup_logging(__name__) logger = setup_logging(__name__)
@ -108,11 +105,7 @@ def create_tasks_in_tracker(data):
'createdBy': 'dr.cyrill', 'createdBy': 'dr.cyrill',
'deadline': task['deadline'], 'deadline': task['deadline'],
'assignee': ya_assignee, 'assignee': ya_assignee,
# 'milestone': task['milestone'],
# 'memberships': task['memberships'],
# 'parent': task['parent'],
'status': task['status'], 'status': task['status'],
# 'completedAt': task['completedAt']
} }
logger.debug('Request: %s', json.dumps(payload)) logger.debug('Request: %s', json.dumps(payload))