fractal-server 1.2.3a1__py3-none-any.whl → 1.2.3a2__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.
- fractal_server/__init__.py +1 -1
- fractal_server/app/api/v1/project.py +1 -1
- fractal_server/app/api/v1/task.py +12 -3
- fractal_server/app/runner/__init__.py +4 -0
- {fractal_server-1.2.3a1.dist-info → fractal_server-1.2.3a2.dist-info}/METADATA +1 -1
- {fractal_server-1.2.3a1.dist-info → fractal_server-1.2.3a2.dist-info}/RECORD +9 -9
- {fractal_server-1.2.3a1.dist-info → fractal_server-1.2.3a2.dist-info}/LICENSE +0 -0
- {fractal_server-1.2.3a1.dist-info → fractal_server-1.2.3a2.dist-info}/WHEEL +0 -0
- {fractal_server-1.2.3a1.dist-info → fractal_server-1.2.3a2.dist-info}/entry_points.txt +0 -0
fractal_server/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__VERSION__ = "1.2.
|
1
|
+
__VERSION__ = "1.2.3a2"
|
@@ -48,7 +48,9 @@ router = APIRouter()
|
|
48
48
|
|
49
49
|
|
50
50
|
async def _background_collect_pip(
|
51
|
-
|
51
|
+
state_id: int,
|
52
|
+
venv_path: Path,
|
53
|
+
task_pkg: _TaskCollectPip,
|
52
54
|
) -> None:
|
53
55
|
"""
|
54
56
|
Install package and collect tasks
|
@@ -59,6 +61,12 @@ async def _background_collect_pip(
|
|
59
61
|
In case of error, copy the log into the state and delete the package
|
60
62
|
directory.
|
61
63
|
"""
|
64
|
+
|
65
|
+
# Note: anext(get_db()) is only available for python>=3.10
|
66
|
+
db = await get_db().__anext__()
|
67
|
+
|
68
|
+
state: State = await db.get(State, state_id)
|
69
|
+
|
62
70
|
logger_name = task_pkg.package.replace("/", "_")
|
63
71
|
logger = set_logger(
|
64
72
|
logger_name=logger_name,
|
@@ -110,6 +118,7 @@ async def _background_collect_pip(
|
|
110
118
|
logger.debug("Task-collection status: OK")
|
111
119
|
logger.info("Background task collection completed successfully")
|
112
120
|
close_logger(logger)
|
121
|
+
await db.close()
|
113
122
|
|
114
123
|
except Exception as e:
|
115
124
|
# Write last logs to file
|
@@ -124,6 +133,7 @@ async def _background_collect_pip(
|
|
124
133
|
state.data = data.sanitised_dict()
|
125
134
|
await db.merge(state)
|
126
135
|
await db.commit()
|
136
|
+
await db.close()
|
127
137
|
|
128
138
|
# Delete corrupted package dir
|
129
139
|
shell_rmtree(venv_path)
|
@@ -240,10 +250,9 @@ async def collect_tasks_pip(
|
|
240
250
|
|
241
251
|
background_tasks.add_task(
|
242
252
|
_background_collect_pip,
|
243
|
-
|
253
|
+
state_id=state.id,
|
244
254
|
venv_path=venv_path,
|
245
255
|
task_pkg=task_pkg,
|
246
|
-
db=db,
|
247
256
|
)
|
248
257
|
logger.debug(
|
249
258
|
"Task-collection endpoint: start background collection "
|
@@ -207,6 +207,10 @@ async def submit_workflow(
|
|
207
207
|
worker_init=worker_init,
|
208
208
|
)
|
209
209
|
|
210
|
+
logger.info(
|
211
|
+
f'End execution of workflow "{workflow.name}"; '
|
212
|
+
f"more logs at {str(log_file_path)}"
|
213
|
+
)
|
210
214
|
logger.debug(f'END workflow "{workflow.name}"')
|
211
215
|
|
212
216
|
db_sync.merge(output_dataset)
|
@@ -1,13 +1,13 @@
|
|
1
1
|
fractal_server/.gitignore,sha256=9swdobOQ_Celjt2OgRUpy9oEpNqTBn-1NRUFfJU4rps,69
|
2
|
-
fractal_server/__init__.py,sha256=
|
2
|
+
fractal_server/__init__.py,sha256=YVtB2kEziyfiwQ28AUVU4Yh9khootFg2QyizaaNDKHs,24
|
3
3
|
fractal_server/__main__.py,sha256=znijcImbcEC4P26ICOhEJ9VY3_5vWdMwQcl-WP25sYA,2202
|
4
4
|
fractal_server/alembic.ini,sha256=MWwi7GzjzawI9cCAK1LW7NxIBQDUqD12-ptJoq5JpP0,3153
|
5
5
|
fractal_server/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
fractal_server/app/api/__init__.py,sha256=A_RS6hUnnFef2dcWbvG0kLmQdNs26g9W47fAbWc_WXo,887
|
7
7
|
fractal_server/app/api/v1/__init__.py,sha256=2HMymr1YkUk39V8iof7KENyLnre4ghouOSvNZ_kF1ec,24
|
8
8
|
fractal_server/app/api/v1/job.py,sha256=UldY2tt904rF95JXaMf7yIkEK0BIVI1k7YchJVr847o,2783
|
9
|
-
fractal_server/app/api/v1/project.py,sha256=
|
10
|
-
fractal_server/app/api/v1/task.py,sha256=
|
9
|
+
fractal_server/app/api/v1/project.py,sha256=WxSnUaY6Xhn1sHlNVKih7iUp6uEJeHzrucfka4heAl8,22441
|
10
|
+
fractal_server/app/api/v1/task.py,sha256=Gbk0mcyQeUb7ebhl5MWHONAFD4pbc81ZcTfbB7Hjm5E,12203
|
11
11
|
fractal_server/app/api/v1/workflow.py,sha256=DPmDgS3Thf1HS46FZCEni9vQEDkA7wPj0BmBa-T2wU0,11503
|
12
12
|
fractal_server/app/db/__init__.py,sha256=Ont7FOvNEEx8-_GFsJ5Lv_5nbxySs_bEpLTdKEzOqDM,2724
|
13
13
|
fractal_server/app/models/__init__.py,sha256=MyHn6KDfdPvBpfvcR2QrhWuP1qle3St3e_YzNYcu9y8,372
|
@@ -18,7 +18,7 @@ fractal_server/app/models/state.py,sha256=uVMwkpalARAni7DNbOQ44v9LikRHJqR7MWlsGy
|
|
18
18
|
fractal_server/app/models/task.py,sha256=3lTZMmHcQK0CgWLjcceyOANdqRt-89n1_z1AMEL2L2Q,1080
|
19
19
|
fractal_server/app/models/workflow.py,sha256=Tf4sT4kciDMhGRCTUFWDtEfTvNj3mdWhCx6fURJp9Vc,5371
|
20
20
|
fractal_server/app/runner/.gitignore,sha256=ytzN_oyHWXrGU7iFAtoHSTUbM6Rn6kG0Zkddg0xZk6s,16
|
21
|
-
fractal_server/app/runner/__init__.py,sha256=
|
21
|
+
fractal_server/app/runner/__init__.py,sha256=dvv6hAQwMGDuJ1S8AiuiCayIX1BDwQC95ywY8VGTmjc,8991
|
22
22
|
fractal_server/app/runner/_common.py,sha256=PoiBIaCclo1DqjqrIY4qbEAvnRgxQ4MgN3x7xfqXUNw,19294
|
23
23
|
fractal_server/app/runner/_local/__init__.py,sha256=JuwhEinF-Yu5C7kkXKqs5cl3OYzCWSSl8uz1HK2eIYY,5460
|
24
24
|
fractal_server/app/runner/_local/_local_config.py,sha256=tz93dzmG2NtgQiCO3k81QgDzNbC1x38_tOjNKNyqYEY,3273
|
@@ -75,8 +75,8 @@ fractal_server/syringe.py,sha256=3qSMW3YaMKKnLdgnooAINOPxnCOxP7y2jeAQYB21Gdo,278
|
|
75
75
|
fractal_server/tasks/__init__.py,sha256=Wzuxf5EoH1v0fYzRpAZHG_S-Z9f6DmbIsuSvllBCGvc,72
|
76
76
|
fractal_server/tasks/collection.py,sha256=hvZeOHenJwvjyFgxIxU7OqOwG8SdmCA9MTBuRAt_Onc,12782
|
77
77
|
fractal_server/utils.py,sha256=b7WwFdcFZ8unyT65mloFToYuEDXpQoHRcmRNqrhd_dQ,2115
|
78
|
-
fractal_server-1.2.
|
79
|
-
fractal_server-1.2.
|
80
|
-
fractal_server-1.2.
|
81
|
-
fractal_server-1.2.
|
82
|
-
fractal_server-1.2.
|
78
|
+
fractal_server-1.2.3a2.dist-info/entry_points.txt,sha256=8tV2kynvFkjnhbtDnxAqImL6HMVKsopgGfew0DOp5UY,58
|
79
|
+
fractal_server-1.2.3a2.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
|
80
|
+
fractal_server-1.2.3a2.dist-info/METADATA,sha256=67PqHNb5VRpj6J26ML8ixnb_qMG6jBUyY5dQRhcNWXQ,3591
|
81
|
+
fractal_server-1.2.3a2.dist-info/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
|
82
|
+
fractal_server-1.2.3a2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|