ciocore 8.1.0b3__py2.py3-none-any.whl → 8.1.0b4__py2.py3-none-any.whl

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.

Potentially problematic release.


This version of ciocore might be problematic. Click here for more details.

ciocore/VERSION CHANGED
@@ -1 +1 @@
1
- 8.1.0-beta.3
1
+ 8.1.0-beta.4
ciocore/auth/server.py CHANGED
@@ -5,6 +5,7 @@ import json
5
5
  import mimetypes
6
6
  import select
7
7
  import time
8
+ import logging
8
9
 
9
10
  try:
10
11
  import SocketServer as socketserver
@@ -68,7 +69,7 @@ class Handler(BaseHTTPRequestHandler):
68
69
 
69
70
  def do_GET(self):
70
71
  global __keep_running__
71
- # Handle arg string
72
+ # Handle arg string
72
73
  self._set_headers()
73
74
  url_args = parse.parse_qs(parse.urlsplit(self.path).query)
74
75
 
@@ -84,8 +85,8 @@ class Handler(BaseHTTPRequestHandler):
84
85
  self._write_credentials(credentials_dict)
85
86
  try:
86
87
  self.wfile.write(bytes(HTML, encoding="utf8"))
87
- except:
88
- self.wfile.write(HTML)
88
+ except TypeError:
89
+ self.wfile.write(HTML.encode('utf8'))
89
90
 
90
91
  __keep_running__ = False
91
92
  return
@@ -113,6 +114,25 @@ def run(server_class=HTTPServer, handler_class=Handler, port=8085, creds_file=No
113
114
  server_class.handle_request = retry_loop
114
115
  httpd = server_class(server_address, handler_class)
115
116
  httpd.timeout = REQUEST_TIMEOUT
116
- timeout = time.time() + SESSION_TIMEOUT
117
- while time.time() < timeout and __keep_running__:
118
- httpd.handle_request()
117
+
118
+ try:
119
+ timeout = time.time() + SESSION_TIMEOUT
120
+ while time.time() < timeout and __keep_running__:
121
+ httpd.handle_request()
122
+ except KeyboardInterrupt:
123
+ logging.info("Server interrupted by user.")
124
+ except Exception as e:
125
+ logging.error(f"An error occurred: {e}")
126
+ finally:
127
+ logging.info("Shutting down the server...")
128
+ httpd.server_close()
129
+
130
+
131
+ def stop_server():
132
+ global __keep_running__
133
+ __keep_running__ = False
134
+
135
+
136
+ # if __name__ == "__main__":
137
+ # logging.basicConfig(level=logging.INFO)
138
+ # run()
Binary file
@@ -195,6 +195,13 @@ class MD5OutputWorker(worker.ThreadWorker):
195
195
  # mark this task as done
196
196
  self.mark_done()
197
197
 
198
+ except SystemExit:
199
+ logger.info("System exit received, performing cleanup.")
200
+ if self.batch:
201
+ self.ship_batch()
202
+ self.thread_complete_counter.decrement()
203
+ break
204
+
198
205
  except Exception as exception:
199
206
  logger.exception('CAUGHT EXCEPTION on job "%s" [%s]:\n', job, self)
200
207
 
@@ -206,7 +213,6 @@ class MD5OutputWorker(worker.ThreadWorker):
206
213
  # exit the while loop to stop the thread
207
214
  break
208
215
 
209
-
210
216
  class HttpBatchWorker(worker.ThreadWorker):
211
217
  """
212
218
  This worker receives a batched list of files (path, hash, size) and makes an batched http api
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ciocore
3
- Version: 8.1.0b3
3
+ Version: 8.1.0b4
4
4
  Summary: Core functionality for Conductor's client tools
5
5
  Home-page: https://github.com/ConductorTechnologies/ciocore
6
6
  Author: conductor
@@ -51,6 +51,8 @@ See [CONTRIBUTING](CONTRIBUTING.md)
51
51
  ## Changelog
52
52
 
53
53
  ## Unreleased:
54
+ * 8.1.0-beta.4
55
+ * Attempt fix to uploader and auth server.
54
56
 
55
57
  * 8.1.0-beta.2
56
58
  * Allow bar and fw slash as separators for package paths
@@ -1,4 +1,4 @@
1
- ciocore/VERSION,sha256=2DRqOK9nMlSC11Nee86uSKsieXWZ1KvFlSNzs6gNdTs,12
1
+ ciocore/VERSION,sha256=wZbbw3PM0skTJS2SUi6CqpU1-RYIflvlCschbWPpfic,12
2
2
  ciocore/__init__.py,sha256=aTP7LeeosQA8BZE67gDV4jgfTK5zxmwZRjiTRu_ZWj0,646
3
3
  ciocore/api_client.py,sha256=LvxG1EfUte3NjLiuVqFUwP2iBRaUdaNSKt4wMu9Bajs,33508
4
4
  ciocore/cli.py,sha256=jZ1lOKQiUcrMhsVmD9SVmPMFwHtgDF4SaoAf2-PBS54,15449
@@ -20,13 +20,13 @@ ciocore/retry.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  ciocore/validator.py,sha256=f_K7gxz122W_i5AxVx6dKhckOygl8TnmQiVj7tyX5zw,2344
21
21
  ciocore/worker.py,sha256=YnE0mGqkky9uxPMyDRmvdt1p1ER_GN39AeZPIGw6f4U,21832
22
22
  ciocore/auth/__init__.py,sha256=cdS-xZzMq41yXM5cz8sUlcYgo8CJYh8HcCCWmhbDgf0,606
23
- ciocore/auth/server.py,sha256=8btX9-EokUl6q55V8muDmEV2tvvbTBD0BHeWFbwkzUc,3892
23
+ ciocore/auth/server.py,sha256=VdD9XjRpsS1DoNuApfpzcOBs2EHNwkY9v5BQ40YaiAo,4376
24
24
  ciocore/docsite/404.html,sha256=zUCnDe9r5yFZh8MXcTmzDaFyYBuRHz1gvuyJS2rYiTI,17207
25
25
  ciocore/docsite/index.html,sha256=xz215H_KHWBYI1HT7IRpAZ4d1ptUiO8Y4DlOmbEPgPk,20945
26
26
  ciocore/docsite/logo.png,sha256=gArgFFWdw8w985-0TkuGIgU_pW9sziEMZdqytXb5WLo,2825
27
27
  ciocore/docsite/objects.inv,sha256=la6BNz_7lZoDCr3Nin1oAB7Y7DvIy4ZOKUvR-9hfwko,785
28
28
  ciocore/docsite/sitemap.xml,sha256=M_V85zl0y2adRvzJAnoCxlZH_Hl7TLnIb1A-6l_xGmI,109
29
- ciocore/docsite/sitemap.xml.gz,sha256=em4iu7zKmOkZgFbmMbI_E6t_BlR_viXFUAOuB44IrWY,127
29
+ ciocore/docsite/sitemap.xml.gz,sha256=_BSMbv_Z0Hn1lvQUVeagljGREB9tQDPGn3_8NVGdSs0,127
30
30
  ciocore/docsite/apidoc/api_client/index.html,sha256=qXLzKggMPnORGOzywLCYVD2Lre1M_3y3dli8fdj3ulo,193119
31
31
  ciocore/docsite/apidoc/apidoc/index.html,sha256=KGsHBY6GBF380w338GfOIMWnwAyyLvw2i1RQFORdwlE,26171
32
32
  ciocore/docsite/apidoc/config/index.html,sha256=n3koKPRUza5-uHUt8hK8H8XyH6HG_U2CsGobdaN4KfY,72559
@@ -95,7 +95,7 @@ ciocore/downloader/perpetual_downloader.py,sha256=cD7lnBH75-c-ZVVPHZc1vSnDhgJOnG
95
95
  ciocore/downloader/registry.py,sha256=_JIOuqpWkJkgJGN33nt-DCvqN9Gw3xeFhzPq4RUxIoE,2903
96
96
  ciocore/downloader/reporter.py,sha256=p1NK9k6iQ-jt7lRvZR0xFz0cGb2yo8tQcjlvYKR9SWM,4501
97
97
  ciocore/uploader/__init__.py,sha256=hxRFJf5Lo86rtRObFXSjjot8nybQd-SebSfYCbgZwow,24
98
- ciocore/uploader/_uploader.py,sha256=40nzqO5DuFi4sx31VvjWxZPNkrWsWqM9jtFVxs_-o3o,37479
98
+ ciocore/uploader/_uploader.py,sha256=5CevtVocVv46Gk1F2RgkvrFKtOS15AhQnQYkejU9y70,37731
99
99
  ciocore/uploader/upload_stats/__init__.py,sha256=Lg1y4zq1i0cwc6Hh2K1TAQDYymLff49W-uIo1xjcvdI,5309
100
100
  ciocore/uploader/upload_stats/stats_formats.py,sha256=giNirtObU66VALWghPFSRhg3q_vw5MvESsnXhb_I3y8,2402
101
101
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -120,8 +120,8 @@ tests/test_uploader.py,sha256=B1llTJt_fqR6e_V_Jxfw9z73QgkFlEPU87xLYGzt-TQ,2914
120
120
  tests/test_validator.py,sha256=2fY66ayNc08PGyj2vTI-V_1yeCWJDngkj2zkUM5TTCI,1526
121
121
  tests/mocks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
122
122
  tests/mocks/glob.py,sha256=J2MH7nqi6NJOHuGdVWxhfeBd700_Ckj6cLh_8jSNkfg,215
123
- ciocore-8.1.0b3.dist-info/METADATA,sha256=2xTpGaHNdwWS50Z-TLAAokcROv9uxcY2Y_DD4-YwPKM,18644
124
- ciocore-8.1.0b3.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
125
- ciocore-8.1.0b3.dist-info/entry_points.txt,sha256=cCqcALMYbC4d8545V9w0Zysfg9MVuKWhzDQ2er4UfGE,47
126
- ciocore-8.1.0b3.dist-info/top_level.txt,sha256=SvlM5JlqULzAz00JZWfiUhfjhqDzYzSWssA87zdJl0o,14
127
- ciocore-8.1.0b3.dist-info/RECORD,,
123
+ ciocore-8.1.0b4.dist-info/METADATA,sha256=hhSZGR2owfeu6ihKfW24bDGgm_NoNBbMAktVM5tTYO4,18705
124
+ ciocore-8.1.0b4.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
125
+ ciocore-8.1.0b4.dist-info/entry_points.txt,sha256=cCqcALMYbC4d8545V9w0Zysfg9MVuKWhzDQ2er4UfGE,47
126
+ ciocore-8.1.0b4.dist-info/top_level.txt,sha256=SvlM5JlqULzAz00JZWfiUhfjhqDzYzSWssA87zdJl0o,14
127
+ ciocore-8.1.0b4.dist-info/RECORD,,