fractal-server 2.9.0a6__py3-none-any.whl → 2.9.0a8__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 +1 @@
1
- __VERSION__ = "2.9.0a6"
1
+ __VERSION__ = "2.9.0a8"
@@ -108,8 +108,6 @@ async def deactivate_task_group(
108
108
  version=task_group.version,
109
109
  timestamp_started=get_timestamp(),
110
110
  )
111
- task_group.active = False
112
- db.add(task_group)
113
111
  db.add(task_group_activity)
114
112
  await db.commit()
115
113
 
@@ -2,6 +2,7 @@
2
2
  Custom version of Python
3
3
  [ProcessPoolExecutor](https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.ProcessPoolExecutor)).
4
4
  """
5
+ import multiprocessing as mp
5
6
  import threading
6
7
  import time
7
8
  from concurrent.futures import ProcessPoolExecutor
@@ -32,7 +33,7 @@ class FractalProcessPoolExecutor(ProcessPoolExecutor):
32
33
  def __init__(
33
34
  self, shutdown_file: Path, interval: float = 1.0, *args, **kwargs
34
35
  ):
35
- super().__init__(*args, **kwargs)
36
+ super().__init__(*args, **kwargs, mp_context=mp.get_context("spawn"))
36
37
  self.shutdown_file = Path(shutdown_file)
37
38
  self.interval = float(interval)
38
39
  logger.debug(
@@ -109,11 +109,12 @@ def deactivate_local(
109
109
  ),
110
110
  logger_name=LOGGER_NAME,
111
111
  )
112
+
113
+ # Update pip-freeze data
112
114
  pip_freeze_stdout = _customize_and_run_template(
113
115
  template_filename="3_pip_freeze.sh",
114
116
  **common_args,
115
117
  )
116
- # Update pip-freeze data
117
118
  logger.info("Add pip freeze stdout to TaskGroupV2 - start")
118
119
  activity.log = get_current_log(log_file_path)
119
120
  activity = add_commit_refresh(obj=activity, db=db)
@@ -190,6 +191,13 @@ def deactivate_local(
190
191
 
191
192
  # We now have all required information for reactivating the
192
193
  # virtual environment at a later point
194
+
195
+ # Actually mark the task group as non-active
196
+ logger.info("Now setting `active=False`.")
197
+ task_group.active = False
198
+ task_group = add_commit_refresh(obj=task_group, db=db)
199
+
200
+ # Proceed with deactivation
193
201
  logger.info(f"Now removing {task_group.venv_path}.")
194
202
  shutil.rmtree(task_group.venv_path)
195
203
  logger.info(f"All good, {task_group.venv_path} removed.")
@@ -119,10 +119,13 @@ def deactivate_ssh(
119
119
  python_bin="/not/applicable",
120
120
  )
121
121
 
122
- # Prepare arguments for `_customize_and_run_template`
122
+ # Define script_dir_remote and create it if missing
123
123
  script_dir_remote = (
124
124
  Path(task_group.path) / SCRIPTS_SUBFOLDER
125
125
  ).as_posix()
126
+ fractal_ssh.mkdir(folder=script_dir_remote, parents=True)
127
+
128
+ # Prepare arguments for `_customize_and_run_template`
126
129
  common_args = dict(
127
130
  replacements=replacements,
128
131
  script_dir_local=(
@@ -220,6 +223,13 @@ def deactivate_ssh(
220
223
 
221
224
  # We now have all required information for reactivating the
222
225
  # virtual environment at a later point
226
+
227
+ # Actually mark the task group as non-active
228
+ logger.info("Now setting `active=False`.")
229
+ task_group.active = False
230
+ task_group = add_commit_refresh(obj=task_group, db=db)
231
+
232
+ # Proceed with deactivation
223
233
  logger.info(f"Now removing {task_group.venv_path}.")
224
234
  fractal_ssh.remove_folder(
225
235
  folder=task_group.venv_path,
@@ -128,10 +128,13 @@ def reactivate_ssh(
128
128
  ("__PIP_FREEZE_FILE__", pip_freeze_file_remote)
129
129
  )
130
130
 
131
- # Prepare common arguments for `_customize_and_run_template``
131
+ # Define script_dir_remote and create it if missing
132
132
  script_dir_remote = (
133
133
  Path(task_group.path) / SCRIPTS_SUBFOLDER
134
134
  ).as_posix()
135
+ fractal_ssh.mkdir(folder=script_dir_remote, parents=True)
136
+
137
+ # Prepare common arguments for `_customize_and_run_template`
135
138
  common_args = dict(
136
139
  replacements=replacements,
137
140
  script_dir_local=(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fractal-server
3
- Version: 2.9.0a6
3
+ Version: 2.9.0a8
4
4
  Summary: Server component of the Fractal analytics platform
5
5
  Home-page: https://github.com/fractal-analytics-platform/fractal-server
6
6
  License: BSD-3-Clause
@@ -1,4 +1,4 @@
1
- fractal_server/__init__.py,sha256=-8jlnit4pXakV2y6U5NGfb9QrAa7CEUtY-AdJIdpxvU,24
1
+ fractal_server/__init__.py,sha256=VLpRwbtJf-Ix3UM5F6cus-Ipabzl-u3aEANGaiXBtsE,24
2
2
  fractal_server/__main__.py,sha256=dEkCfzLLQrIlxsGC-HBfoR-RBMWnJDgNrxYTyzmE9c0,6146
3
3
  fractal_server/alembic.ini,sha256=MWwi7GzjzawI9cCAK1LW7NxIBQDUqD12-ptJoq5JpP0,3153
4
4
  fractal_server/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -31,7 +31,7 @@ fractal_server/app/routes/admin/v2/job.py,sha256=cbkFIRIIXaWmNsUFI7RAu8HpQ0mWn_b
31
31
  fractal_server/app/routes/admin/v2/project.py,sha256=luy-yiGX1JYTdPm1hpIdDUUqPm8xHuipLy9k2X6zu74,1223
32
32
  fractal_server/app/routes/admin/v2/task.py,sha256=Y0eujBgGhVapNXfW9azDxw4EBzLmEmCdh70y1RNQcb0,3895
33
33
  fractal_server/app/routes/admin/v2/task_group.py,sha256=DncrOAB4q-v3BAmxg35m4EohleriW_FLGE5gpW_Or08,8120
34
- fractal_server/app/routes/admin/v2/task_group_lifecycle.py,sha256=bGD5cbZI7t6t-KQuY9YQ5iIksBT68Qbz2kMkVqrGaqc,9482
34
+ fractal_server/app/routes/admin/v2/task_group_lifecycle.py,sha256=0e0ZJ_k75TVHaT2o8Xk33DPDSgh-eBhZf-y4y7t-Adg,9429
35
35
  fractal_server/app/routes/api/__init__.py,sha256=2IDheFi0OFdsUg7nbUiyahqybvpgXqeHUXIL2QtWrQQ,641
36
36
  fractal_server/app/routes/api/v1/__init__.py,sha256=Y2HQdG197J0a7DyQEE2jn53IfxD0EHGhzK1I2JZuEck,958
37
37
  fractal_server/app/routes/api/v1/_aux_functions.py,sha256=P9Q48thGH95w0h5cacYoibxqgiiLW4oqZ8rNJ2LIISY,13219
@@ -118,7 +118,7 @@ fractal_server/app/runner/v2/_local/executor.py,sha256=QrJlD77G6q4WohoJQO7XXbvi2
118
118
  fractal_server/app/runner/v2/_local_experimental/__init__.py,sha256=53yS8a-l0dMTT_4oz7WVFbKJ3NRsycyutYkOuBTm6Ik,5694
119
119
  fractal_server/app/runner/v2/_local_experimental/_local_config.py,sha256=QiS5ODe-iGmUQdIT8QgpbyMc7-ZpIRv1V_f2q3qfPQ8,3211
120
120
  fractal_server/app/runner/v2/_local_experimental/_submit_setup.py,sha256=we7r-sQf0CJ9gxbfbgHcYdC6pKjx8eXweljIjthxkv8,1212
121
- fractal_server/app/runner/v2/_local_experimental/executor.py,sha256=vcBKjireIIyF5WgIQLatD6ojlWEydbTwyIG0bcpIjys,5438
121
+ fractal_server/app/runner/v2/_local_experimental/executor.py,sha256=plvEqqdcXOSohYsQoykYlyDwCING7OO5h-4XAZtwdPs,5503
122
122
  fractal_server/app/runner/v2/_slurm_common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
123
123
  fractal_server/app/runner/v2/_slurm_common/get_slurm_config.py,sha256=UdkoFF0HF_TdKbay-d9bjkxT2ltcOE5i8H_FoOu64HU,6202
124
124
  fractal_server/app/runner/v2/_slurm_ssh/__init__.py,sha256=D0Dnbhnzw0BXwQmjqLmxqpE9oreAtasA-9aOzxC4l_I,4530
@@ -217,13 +217,13 @@ fractal_server/tasks/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
217
217
  fractal_server/tasks/v2/local/__init__.py,sha256=9RVItnS7OyLsJOuJjWMCicaky4ASUPQEYD4SzDs0hOE,141
218
218
  fractal_server/tasks/v2/local/_utils.py,sha256=EvhmVwYjqaNyDCUMEsTWYOUXLgEwR1xr6bu32apCEI8,2491
219
219
  fractal_server/tasks/v2/local/collect.py,sha256=BbXSgxExPUxFxcmBs3ejwWzRae-sQgfbk3zZkAQg77Y,12190
220
- fractal_server/tasks/v2/local/deactivate.py,sha256=Tjooode2oXfaSLiJz7iSu-qC1OkeIJtOQeUvUo4K4Ts,8970
220
+ fractal_server/tasks/v2/local/deactivate.py,sha256=XR1nvJY3mKCRqwPwV79rVaQmtb3J83KdmJKjTOHD-cU,9250
221
221
  fractal_server/tasks/v2/local/reactivate.py,sha256=R3rArAzUpMGf6xa3dGVwwXHW9WVDi5ia28AFisZsqNc,6112
222
222
  fractal_server/tasks/v2/ssh/__init__.py,sha256=aSQbVi6Ummt9QzcSLWNmSqYjfdxrn9ROmqgH6bDpI7k,135
223
223
  fractal_server/tasks/v2/ssh/_utils.py,sha256=2E-F_862zM6FZA-im-E8t8kjptWRIhBj1IDHC6QD1H8,2818
224
224
  fractal_server/tasks/v2/ssh/collect.py,sha256=ZOpz-v2t2kOAbbpdlsH_P_XjNtEh2TaC1dIZ1bBHwxw,12941
225
- fractal_server/tasks/v2/ssh/deactivate.py,sha256=YNJEcUPNuQ7H3I9EtWn84es2AY9Dnij388w6PQra4wc,10186
226
- fractal_server/tasks/v2/ssh/reactivate.py,sha256=brIa3XuoD7g9m9vIB7CSgog6KC9w8e45phLT-vSSXlI,7754
225
+ fractal_server/tasks/v2/ssh/deactivate.py,sha256=Ffk_UuQSBUBNBCiviuKNhEUGyZPQa4_erJKFdwgMcE8,10616
226
+ fractal_server/tasks/v2/ssh/reactivate.py,sha256=jdO8iyzavzSVPcOpIZrYSEkGPYTvz5XJ5h_5-nz9yzA,7896
227
227
  fractal_server/tasks/v2/templates/1_create_venv.sh,sha256=PK0jdHKtQpda1zULebBaVPORt4t6V17wa4N1ohcj5ac,548
228
228
  fractal_server/tasks/v2/templates/2_pip_install.sh,sha256=RDDfbFnGOK3aRuHyXqDOUNCGullzAr0zS7BFqG1CJeE,1720
229
229
  fractal_server/tasks/v2/templates/3_pip_freeze.sh,sha256=JldREScEBI4cD_qjfX4UK7V4aI-FnX9ZvVNxgpSOBFc,168
@@ -238,8 +238,8 @@ fractal_server/tasks/v2/utils_templates.py,sha256=C5WLuY3uGG2s53OEL-__H35-fmSlgu
238
238
  fractal_server/urls.py,sha256=5o_qq7PzKKbwq12NHSQZDmDitn5RAOeQ4xufu-2v9Zk,448
239
239
  fractal_server/utils.py,sha256=utvmBx8K9I8hRWFquxna2pBaOqe0JifDL_NVPmihEJI,3525
240
240
  fractal_server/zip_tools.py,sha256=GjDgo_sf6V_DDg6wWeBlZu5zypIxycn_l257p_YVKGc,4876
241
- fractal_server-2.9.0a6.dist-info/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
242
- fractal_server-2.9.0a6.dist-info/METADATA,sha256=omzzbgGU1_NXRisynk37b4eRZsY6PQEcAIblR7YjIHk,4585
243
- fractal_server-2.9.0a6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
244
- fractal_server-2.9.0a6.dist-info/entry_points.txt,sha256=8tV2kynvFkjnhbtDnxAqImL6HMVKsopgGfew0DOp5UY,58
245
- fractal_server-2.9.0a6.dist-info/RECORD,,
241
+ fractal_server-2.9.0a8.dist-info/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
242
+ fractal_server-2.9.0a8.dist-info/METADATA,sha256=lJzxJeo2n6DgBq4W6SjhuD0Vq4YL82QbSxBj62aFjcQ,4585
243
+ fractal_server-2.9.0a8.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
244
+ fractal_server-2.9.0a8.dist-info/entry_points.txt,sha256=8tV2kynvFkjnhbtDnxAqImL6HMVKsopgGfew0DOp5UY,58
245
+ fractal_server-2.9.0a8.dist-info/RECORD,,