dqlmagic 1.2.1__tar.gz → 1.2.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dqlmagic
3
- Version: 1.2.1
3
+ Version: 1.2.3
4
4
  Summary: IPython magic function for Dynatrace Query Language (DQL)
5
5
  Home-page: https://github.com/dtPaTh/Dqlmagic
6
6
  Author: Patrick Thurner
@@ -1,4 +1,4 @@
1
- __version__='1.2.1'
1
+ __version__='1.2.3'
2
2
 
3
3
  from .dqlmagic import DQLmagic
4
4
 
@@ -182,6 +182,7 @@ class DQLmagic(Magics):
182
182
 
183
183
  polling_interval = 1
184
184
 
185
+ inc = 0
185
186
  while True:
186
187
  statusResponse = requests.get(self.grail_apiurl+"query:poll", headers=headers, params=statusQueryParams)
187
188
 
@@ -189,9 +190,16 @@ class DQLmagic(Magics):
189
190
  resJson = statusResponse.json()
190
191
  status_update = resJson["state"]
191
192
  if status_update == "SUCCEEDED":
193
+ print ("Query finished!", end="\r")
192
194
  return statusResponse.text
193
195
  else:
194
- print ("Query in progress.. "+str(resJson["progress"])+"%", end="\r")
196
+ if resJson.get("progress"):
197
+ print ("Query in progress.. "+str(resJson["progress"])+"%", end="\r")
198
+ else:
199
+ spinner = "|" if inc%4==1 else "/" if inc%4==2 else "-" if inc%4==3 else "\\"
200
+ print ("Query in progress.. "+spinner, end="\r")
201
+ inc+=1
202
+
195
203
  time.sleep(polling_interval)
196
204
  else:
197
205
  return '{"result":{"records":[{"ERROR":"Failed to poll query result ('+str(statusResponse.status_code)+')"}]}}'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dqlmagic
3
- Version: 1.2.1
3
+ Version: 1.2.3
4
4
  Summary: IPython magic function for Dynatrace Query Language (DQL)
5
5
  Home-page: https://github.com/dtPaTh/Dqlmagic
6
6
  Author: Patrick Thurner
File without changes
File without changes
File without changes
File without changes