flock-core 0.5.23__py3-none-any.whl → 0.5.25__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 flock-core might be problematic. Click here for more details.
- flock/core/orchestrator.py +9 -2
- flock/orchestrator/artifact_manager.py +22 -4
- {flock_core-0.5.23.dist-info → flock_core-0.5.25.dist-info}/METADATA +1 -1
- {flock_core-0.5.23.dist-info → flock_core-0.5.25.dist-info}/RECORD +7 -7
- {flock_core-0.5.23.dist-info → flock_core-0.5.25.dist-info}/WHEEL +0 -0
- {flock_core-0.5.23.dist-info → flock_core-0.5.25.dist-info}/entry_points.txt +0 -0
- {flock_core-0.5.23.dist-info → flock_core-0.5.25.dist-info}/licenses/LICENSE +0 -0
flock/core/orchestrator.py
CHANGED
|
@@ -731,6 +731,7 @@ class Flock(metaclass=AutoTracedMeta):
|
|
|
731
731
|
partition_key: str | None = None,
|
|
732
732
|
tags: set[str] | None = None,
|
|
733
733
|
is_dashboard: bool = False,
|
|
734
|
+
schedule_immediately: bool = True,
|
|
734
735
|
) -> Artifact:
|
|
735
736
|
"""Publish an artifact to the blackboard (event-driven).
|
|
736
737
|
|
|
@@ -743,16 +744,22 @@ class Flock(metaclass=AutoTracedMeta):
|
|
|
743
744
|
partition_key=partition_key,
|
|
744
745
|
tags=tags,
|
|
745
746
|
is_dashboard=is_dashboard,
|
|
747
|
+
schedule_immediately=schedule_immediately,
|
|
746
748
|
)
|
|
747
749
|
|
|
748
750
|
async def publish_many(
|
|
749
|
-
self,
|
|
751
|
+
self,
|
|
752
|
+
objects: Iterable[BaseModel | dict | Artifact],
|
|
753
|
+
schedule_immediately: bool = True,
|
|
754
|
+
**kwargs: Any,
|
|
750
755
|
) -> list[Artifact]:
|
|
751
756
|
"""Publish multiple artifacts at once (event-driven).
|
|
752
757
|
|
|
753
758
|
Delegates to ArtifactManager for batch publishing.
|
|
754
759
|
"""
|
|
755
|
-
return await self._artifact_manager.publish_many(
|
|
760
|
+
return await self._artifact_manager.publish_many(
|
|
761
|
+
objects, schedule_immediately=schedule_immediately, **kwargs
|
|
762
|
+
)
|
|
756
763
|
|
|
757
764
|
# -----------------------------------------------------------------------------
|
|
758
765
|
# NEW DIRECT INVOCATION API - Explicit Control
|
|
@@ -53,6 +53,7 @@ class ArtifactManager:
|
|
|
53
53
|
partition_key: str | None = None,
|
|
54
54
|
tags: set[str] | None = None,
|
|
55
55
|
is_dashboard: bool = False,
|
|
56
|
+
schedule_immediately: bool = True,
|
|
56
57
|
) -> Artifact:
|
|
57
58
|
"""Publish an artifact to the blackboard (event-driven).
|
|
58
59
|
|
|
@@ -125,12 +126,18 @@ class ArtifactManager:
|
|
|
125
126
|
"Expected BaseModel, dict, or Artifact."
|
|
126
127
|
)
|
|
127
128
|
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
if schedule_immediately:
|
|
130
|
+
await self.persist_and_schedule(artifact)
|
|
131
|
+
else:
|
|
132
|
+
await self.persist(artifact)
|
|
133
|
+
|
|
130
134
|
return artifact
|
|
131
135
|
|
|
132
136
|
async def publish_many(
|
|
133
|
-
self,
|
|
137
|
+
self,
|
|
138
|
+
objects: Iterable[BaseModel | dict | Artifact],
|
|
139
|
+
schedule_immediately: bool = True,
|
|
140
|
+
**kwargs: Any,
|
|
134
141
|
) -> list[Artifact]:
|
|
135
142
|
"""Publish multiple artifacts at once (event-driven).
|
|
136
143
|
|
|
@@ -150,7 +157,9 @@ class ArtifactManager:
|
|
|
150
157
|
"""
|
|
151
158
|
artifacts = []
|
|
152
159
|
for obj in objects:
|
|
153
|
-
artifact = await self.publish(
|
|
160
|
+
artifact = await self.publish(
|
|
161
|
+
obj, schedule_immediately=schedule_immediately, **kwargs
|
|
162
|
+
)
|
|
154
163
|
artifacts.append(artifact)
|
|
155
164
|
return artifacts
|
|
156
165
|
|
|
@@ -164,5 +173,14 @@ class ArtifactManager:
|
|
|
164
173
|
self._orchestrator.metrics["artifacts_published"] += 1
|
|
165
174
|
await self._scheduler.schedule_artifact(artifact)
|
|
166
175
|
|
|
176
|
+
async def persist(self, artifact: Artifact) -> None:
|
|
177
|
+
"""Persist artifact to store without scheduling.
|
|
178
|
+
|
|
179
|
+
Args:
|
|
180
|
+
artifact: Artifact to publish
|
|
181
|
+
"""
|
|
182
|
+
await self._store.publish(artifact)
|
|
183
|
+
self._orchestrator.metrics["artifacts_published"] += 1
|
|
184
|
+
|
|
167
185
|
|
|
168
186
|
__all__ = ["ArtifactManager"]
|
|
@@ -26,7 +26,7 @@ flock/core/__init__.py,sha256=pEE4dbPtSEIC1WQYK8USWbF0EmZhccTfDO7eh7lzD-s,574
|
|
|
26
26
|
flock/core/agent.py,sha256=iP6AfNUb_446eu-4NAJsqVuGLyf4H46n-aZUXw1Jqk4,38118
|
|
27
27
|
flock/core/artifacts.py,sha256=dHDjn3DgS0Yo62oFoafQcdYNtqFrqLCzkvUytwm5VGU,2532
|
|
28
28
|
flock/core/context_provider.py,sha256=1RG4lYhDNTshAQA1PwZELtUF2UDdC5NZWcBlE4BKDtc,20260
|
|
29
|
-
flock/core/orchestrator.py,sha256=
|
|
29
|
+
flock/core/orchestrator.py,sha256=Fgl32VKWzW-xzVhfbEnhJCFiZVJhpNiYR9hHcd12TPE,43214
|
|
30
30
|
flock/core/store.py,sha256=4Zyh73RjjiUTtYTYiZ1pajWVXWKIew0dFERTNgQxRAA,31964
|
|
31
31
|
flock/core/subscription.py,sha256=x2kkbaAbqFqR2woCYhc0a7Xi2k4-EYt8-LCNnTtN-jQ,10768
|
|
32
32
|
flock/core/visibility.py,sha256=uwscg32t6Dp9LuA_EVDT5-_1lotzZWWS9Dl1foyJDxo,2926
|
|
@@ -219,7 +219,7 @@ flock/models/__init__.py,sha256=724PD_4bRX0rFdBDXzP0Pwr-OUntq0LIH48bMmtfcM0,266
|
|
|
219
219
|
flock/models/system_artifacts.py,sha256=f4O-gErJRy5aMFVDh6ZGcj_5Gr130WnG28m5AfhnbxU,1083
|
|
220
220
|
flock/orchestrator/__init__.py,sha256=u4DDXcwCSGrpHYbkdA4eP4W9Uj9vNMF6qxxUtygwmEU,1728
|
|
221
221
|
flock/orchestrator/artifact_collector.py,sha256=XUB4dmx2tzq0p2CkYfP4NowfBkryp3DNA9jb7PWEIDk,6419
|
|
222
|
-
flock/orchestrator/artifact_manager.py,sha256=
|
|
222
|
+
flock/orchestrator/artifact_manager.py,sha256=TR5gZqWehNFkeHxfFUIPU_P7-JnWVjK43sy3THVh-9I,6288
|
|
223
223
|
flock/orchestrator/batch_accumulator.py,sha256=WbIQqQz03LRLPe9yJsf_6TgppofE2tN_7f60P38n2S8,8027
|
|
224
224
|
flock/orchestrator/component_runner.py,sha256=pf068DRGw4unh4K09Y8gt-OLM3FLm6CHQQ3d13jzkmM,14266
|
|
225
225
|
flock/orchestrator/context_builder.py,sha256=Wp7_lzu_F7y-be6uiplur0VGauuP58NSmu1foXFfZc0,6244
|
|
@@ -594,8 +594,8 @@ flock/utils/utilities.py,sha256=E3EQDo5SLU4XeoL3-PCc4lOatJHFEkMHKbZhnGhdMG4,1248
|
|
|
594
594
|
flock/utils/validation.py,sha256=Vqzd8Qi73ttJNSHdr8EUEonyfzAYWVfEyW0fhLs1bA4,1847
|
|
595
595
|
flock/utils/visibility.py,sha256=riJfHFWH8R2vk3DU7PYNi2LMaE8cy8pnMvxxiqWq-4I,2349
|
|
596
596
|
flock/utils/visibility_utils.py,sha256=eGA28aL8FnGyGzsbVNvqI1UoPauu1Jedl5LUZ5oWZZ0,3874
|
|
597
|
-
flock_core-0.5.
|
|
598
|
-
flock_core-0.5.
|
|
599
|
-
flock_core-0.5.
|
|
600
|
-
flock_core-0.5.
|
|
601
|
-
flock_core-0.5.
|
|
597
|
+
flock_core-0.5.25.dist-info/METADATA,sha256=oMqLaGH3v3yMaLwcaqzLPRUxhSUUWC9VhxPJfgke2C8,31235
|
|
598
|
+
flock_core-0.5.25.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
599
|
+
flock_core-0.5.25.dist-info/entry_points.txt,sha256=UQdPmtHd97gSA_IdLt9MOd-1rrf_WO-qsQeIiHWVrp4,42
|
|
600
|
+
flock_core-0.5.25.dist-info/licenses/LICENSE,sha256=U3IZuTbC0yLj7huwJdldLBipSOHF4cPf6cUOodFiaBE,1072
|
|
601
|
+
flock_core-0.5.25.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|