ga-api-client 0.2.9__tar.gz → 0.2.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ga-api-client-0.2.9/ga_api_client.egg-info → ga-api-client-0.2.12}/PKG-INFO +1 -1
- {ga-api-client-0.2.9 → ga-api-client-0.2.12}/ga_api/ga_api_client.py +10 -1
- {ga-api-client-0.2.9 → ga-api-client-0.2.12}/ga_api/hyper_log_log.py +5 -4
- {ga-api-client-0.2.9 → ga-api-client-0.2.12/ga_api_client.egg-info}/PKG-INFO +1 -1
- {ga-api-client-0.2.9 → ga-api-client-0.2.12}/setup.cfg +1 -1
- {ga-api-client-0.2.9 → ga-api-client-0.2.12}/LICENSE +0 -0
- {ga-api-client-0.2.9 → ga-api-client-0.2.12}/README.md +0 -0
- {ga-api-client-0.2.9 → ga-api-client-0.2.12}/ga_api/__init__.py +0 -0
- {ga-api-client-0.2.9 → ga-api-client-0.2.12}/ga_api/field_tree.py +0 -0
- {ga-api-client-0.2.9 → ga-api-client-0.2.12}/ga_api_client.egg-info/SOURCES.txt +0 -0
- {ga-api-client-0.2.9 → ga-api-client-0.2.12}/ga_api_client.egg-info/dependency_links.txt +0 -0
- {ga-api-client-0.2.9 → ga-api-client-0.2.12}/ga_api_client.egg-info/requires.txt +0 -0
- {ga-api-client-0.2.9 → ga-api-client-0.2.12}/ga_api_client.egg-info/top_level.txt +0 -0
- {ga-api-client-0.2.9 → ga-api-client-0.2.12}/pyproject.toml +0 -0
- {ga-api-client-0.2.9 → ga-api-client-0.2.12}/setup.py +0 -0
|
@@ -161,6 +161,7 @@ class Client:
|
|
|
161
161
|
retry_count += 1
|
|
162
162
|
logging.warning(f'retry {retry_count}-th time')
|
|
163
163
|
else:
|
|
164
|
+
logging.error(f'authentication fail {e.message}')
|
|
164
165
|
raise e
|
|
165
166
|
# send the request
|
|
166
167
|
retry_count = 0
|
|
@@ -180,6 +181,14 @@ class Client:
|
|
|
180
181
|
text = await resp.text()
|
|
181
182
|
logging.debug(f'status={resp.status} message={text}')
|
|
182
183
|
continue
|
|
184
|
+
elif resp.status == 500: # General error contain retry information
|
|
185
|
+
text = await resp.text()
|
|
186
|
+
if 'Warning' in text or 'Please try again' in text:
|
|
187
|
+
logging.debug(f'status={resp.status} message={text}')
|
|
188
|
+
continue
|
|
189
|
+
else:
|
|
190
|
+
logging.error(f'unexpected status={resp.status} message={text}')
|
|
191
|
+
raise UnexpectedStatus(resp.status, text)
|
|
183
192
|
else:
|
|
184
193
|
text = await resp.text()
|
|
185
194
|
logging.error(f'unexpected status={resp.status} message={text}')
|
|
@@ -189,7 +198,7 @@ class Client:
|
|
|
189
198
|
retry_count += 1
|
|
190
199
|
logging.warning(f'{method} {path}, retry {retry_count}')
|
|
191
200
|
else:
|
|
192
|
-
logging.error(f'{method} {path} fail')
|
|
201
|
+
logging.error(f'{method} {path} fail {e.message}')
|
|
193
202
|
raise e
|
|
194
203
|
|
|
195
204
|
class System(Client):
|
|
@@ -34,10 +34,11 @@ class HyperLogLog:
|
|
|
34
34
|
return f'h:{self._rmem.hex()}'
|
|
35
35
|
|
|
36
36
|
def insert(self, hval):
|
|
37
|
-
hval &=
|
|
38
|
-
pos = hval >>
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
hval &= 0xFFFFFFFF
|
|
38
|
+
pos = hval >> 21 # 0..2047
|
|
39
|
+
hval = (hval << 11) & 0xFFFFFFFF
|
|
40
|
+
val = 32 - hval.bit_length()
|
|
41
|
+
self._rmem[pos] |= 1 << val
|
|
41
42
|
|
|
42
43
|
def value(self):
|
|
43
44
|
N = 1 << 11
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|