pybiolib 1.1.2226__py3-none-any.whl → 1.1.2232__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.
@@ -1,3 +1,4 @@
1
+ import base64
1
2
  import io
2
3
  import subprocess
3
4
  import tarfile
@@ -160,6 +161,9 @@ class RemoteHostProxy:
160
161
  access_token = BiolibApiClient.get().access_token
161
162
  bearer_token = f'Bearer {access_token}' if access_token else ''
162
163
 
164
+ biolib_index_basic_auth = f'compute_node|admin:{compute_node_auth_token},{self._job_uuid}'
165
+ biolib_index_basic_auth_base64 = base64.b64encode(biolib_index_basic_auth.encode('utf-8')).decode('utf-8')
166
+
163
167
  nginx_config = f"""
164
168
  events {{
165
169
  worker_connections 1024;
@@ -315,6 +319,13 @@ http {{
315
319
  proxy_ssl_server_name on;
316
320
  }}
317
321
 
322
+ location /proxy/index/ {{
323
+ proxy_pass https://$upstream_hostname$request_uri;
324
+ proxy_set_header authorization "Basic {biolib_index_basic_auth_base64}";
325
+ proxy_set_header cookie "";
326
+ proxy_ssl_server_name on;
327
+ }}
328
+
318
329
  location / {{
319
330
  return 404 "Not found";
320
331
  }}
@@ -221,8 +221,8 @@ class WorkerThread(threading.Thread):
221
221
  if self._connection:
222
222
  self._connection.close()
223
223
 
224
- if not utils.IS_RUNNING_IN_CLOUD and self.compute_state['progress'] == 95:
225
- seconds_to_sleep = 60 # 1 minute
224
+ if self.compute_state['progress'] == 95:
225
+ seconds_to_sleep = 5
226
226
  logger_no_user_data.debug(
227
227
  f'Job "{self._job_uuid}" worker thread sleeping for {seconds_to_sleep} seconds before cleaning up'
228
228
  )
@@ -231,7 +231,7 @@ class WorkerThread(threading.Thread):
231
231
 
232
232
  compute_state_dict = webserver_utils.JOB_ID_TO_COMPUTE_STATE_DICT
233
233
  if self._job_uuid in compute_state_dict:
234
- # Delete result as user has not started download within 60 seconds
234
+ # Delete result as user has not started download
235
235
  if compute_state_dict[self._job_uuid]['progress'] == 95 and os.path.exists(self._job_temporary_dir):
236
236
  shutil.rmtree(self._job_temporary_dir)
237
237
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pybiolib
3
- Version: 1.1.2226
3
+ Version: 1.1.2232
4
4
  Summary: BioLib Python Client
5
5
  Home-page: https://github.com/biolib
6
6
  License: MIT
@@ -86,7 +86,7 @@ biolib/compute_node/job_worker/large_file_system.py,sha256=XXqRlVtYhs-Ji9zQGIk5K
86
86
  biolib/compute_node/job_worker/mappings.py,sha256=Z48Kg4nbcOvsT2-9o3RRikBkqflgO4XeaWxTGz-CNvI,2499
87
87
  biolib/compute_node/job_worker/utilization_reporter_thread.py,sha256=7tm5Yk9coqJ9VbEdnO86tSXI0iM0omwIyKENxdxiVXk,8575
88
88
  biolib/compute_node/job_worker/utils.py,sha256=wgxcIA8yAhUPdCwyvuuJ0JmreyWmmUoBO33vWtG60xg,1282
89
- biolib/compute_node/remote_host_proxy.py,sha256=V85f4BFGGIS9mPA6W4HLxP8QHPg3MIzKm-awouYy4oo,14671
89
+ biolib/compute_node/remote_host_proxy.py,sha256=ibkWqvLJJHwOM7GzYqJV613QPacU5392vjnDK8BNJIU,15213
90
90
  biolib/compute_node/socker_listener_thread.py,sha256=T5_UikA3MB9bD5W_dckYLPTgixh72vKUlgbBvj9dbM0,1601
91
91
  biolib/compute_node/socket_sender_thread.py,sha256=YgamPHeUm2GjMFGx8qk-99WlZhEs-kAb3q_2O6qByig,971
92
92
  biolib/compute_node/utils.py,sha256=M7i_WTyxbFM3Lri9RWZ_8FeQNYrQIWpKGLfp2I55oeY,4677
@@ -95,7 +95,7 @@ biolib/compute_node/webserver/gunicorn_flask_application.py,sha256=jPfR_YvNBekLU
95
95
  biolib/compute_node/webserver/webserver.py,sha256=15PkRyhtdtSgFDxa0z78aPO4ciZURsFqJYi-HtUmZF8,6494
96
96
  biolib/compute_node/webserver/webserver_types.py,sha256=2t8EaFKESnves3BA_NBdnS2yAdo1qwamCFHiSt888nE,380
97
97
  biolib/compute_node/webserver/webserver_utils.py,sha256=XWvwYPbWNR3qS0FYbLLp-MDDfVk0QdaAmg3xPrT0H2s,4234
98
- biolib/compute_node/webserver/worker_thread.py,sha256=AfzSK6ZXXHB1QufemIEmCbVjvLPcOieNJK4xJRRM7B0,11871
98
+ biolib/compute_node/webserver/worker_thread.py,sha256=GRRBUqXdMKvbjyLQhYlqGIbFKeU2iiEXIe5IXi9wgdg,11806
99
99
  biolib/experiments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
100
100
  biolib/experiments/experiment.py,sha256=jIRixmQm3Gq9YdJ3I0-rE1vFukXqq6U4zXehFOJ1yZk,7614
101
101
  biolib/jobs/__init__.py,sha256=aIb2H2DHjQbM2Bs-dysFijhwFcL58Blp0Co0gimED3w,32
@@ -116,8 +116,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
116
116
  biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
117
117
  biolib/utils/seq_util.py,sha256=ZQFcaE37B2dtucN2zDjOmdya_X0ITc1zBFZJNQY13XA,5183
118
118
  biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
119
- pybiolib-1.1.2226.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
120
- pybiolib-1.1.2226.dist-info/METADATA,sha256=nBY9sWaEZd14c9PTpMTzy8O2WzG7uCJC9uNuzzSC4ws,1508
121
- pybiolib-1.1.2226.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
122
- pybiolib-1.1.2226.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
123
- pybiolib-1.1.2226.dist-info/RECORD,,
119
+ pybiolib-1.1.2232.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
120
+ pybiolib-1.1.2232.dist-info/METADATA,sha256=sHw31HLhvgjJu0CXym6DHC1Q2QeQnTOB5GCZTLD8P3Y,1508
121
+ pybiolib-1.1.2232.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
122
+ pybiolib-1.1.2232.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
123
+ pybiolib-1.1.2232.dist-info/RECORD,,