##// END OF EJS Templates
Log requests during sync. Remove request body from log cause it is too large
neko259 -
r1581:8b72916c default
parent child Browse files
Show More
@@ -43,7 +43,6 b' class Command(BaseCommand):'
43 43 local_id=local_id)
44 44
45 45 xml = GlobalId.objects.generate_request_get([global_id])
46 # body = urllib.parse.urlencode(data)
47 46 h = httplib2.Http()
48 47 response, content = h.request(get_url, method="POST", body=xml)
49 48
@@ -51,12 +50,11 b' class Command(BaseCommand):'
51 50 else:
52 51 raise Exception('Invalid global ID')
53 52 else:
53 print('Running LIST request')
54 54 h = httplib2.Http()
55 55 xml = GlobalId.objects.generate_request_list()
56 56 response, content = h.request(list_url, method="POST", body=xml)
57 57
58 print(content.decode() + '\n')
59
60 58 root = ET.fromstring(content)
61 59 status = root.findall('status')[0].text
62 60 if status == 'success':
@@ -79,8 +77,8 b' class Command(BaseCommand):'
79 77 limit = options.get('split_query', len(ids_to_sync))
80 78 for offset in range(0, len(ids_to_sync), limit):
81 79 xml = GlobalId.objects.generate_request_get(ids_to_sync[offset:offset+limit])
82 # body = urllib.parse.urlencode(data)
83 80 h = httplib2.Http()
81 print('Running GET request')
84 82 response, content = h.request(get_url, method="POST", body=xml)
85 83
86 84 SyncManager.parse_response_get(content, file_url)
General Comments 0
You need to be logged in to leave comments. Login now