@danhachuel/thunderbolt 0.5.76 → 0.5.77
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.
- package/app/main.py +10 -2
- package/package.json +1 -1
package/app/main.py
CHANGED
|
@@ -4798,6 +4798,14 @@ def _render_video_task_state(task: dict[str, Any]) -> None:
|
|
|
4798
4798
|
st.caption(f"Manifesto: {task.get('video_result')}")
|
|
4799
4799
|
|
|
4800
4800
|
|
|
4801
|
+
def _start_pipeline_task(task_id: str, state: str) -> None:
|
|
4802
|
+
"""Start or retry a video task from any platform automation card."""
|
|
4803
|
+
if state in {"blocked", "failed"}:
|
|
4804
|
+
retry_task_with_current_settings(task_id)
|
|
4805
|
+
else:
|
|
4806
|
+
transition_task(task_id, "doing")
|
|
4807
|
+
|
|
4808
|
+
|
|
4801
4809
|
def render_videos():
|
|
4802
4810
|
st.subheader("Backlog Videos")
|
|
4803
4811
|
st.caption("Acompanhamento dos vídeos criados, estados da pipeline e controlos de execução.")
|
|
@@ -4854,7 +4862,7 @@ def render_videos():
|
|
|
4854
4862
|
start_col, stop_col = st.columns(2)
|
|
4855
4863
|
with start_col:
|
|
4856
4864
|
if st.button("Start", key=f"automation_start_{task['id']}", use_container_width=True, disabled=state not in {"to_do", "blocked", "failed"}):
|
|
4857
|
-
|
|
4865
|
+
_start_pipeline_task(str(task["id"]), state)
|
|
4858
4866
|
st.rerun()
|
|
4859
4867
|
with stop_col:
|
|
4860
4868
|
if st.button("Stop", key=f"automation_stop_{task['id']}", use_container_width=True, disabled=state != "doing"):
|
|
@@ -5236,7 +5244,7 @@ def render_tiktok_automation():
|
|
|
5236
5244
|
with cols[3]:
|
|
5237
5245
|
state = str(task.get("state") or "")
|
|
5238
5246
|
if st.button("Start", key=f"tiktok_automation_start_{task_id}", disabled=state not in {"to_do", "blocked", "failed"}, use_container_width=True):
|
|
5239
|
-
|
|
5247
|
+
_start_pipeline_task(task_id, state)
|
|
5240
5248
|
st.rerun()
|
|
5241
5249
|
if st.button("Stop", key=f"tiktok_automation_stop_{task_id}", disabled=state != "doing", use_container_width=True):
|
|
5242
5250
|
stop_task_by_user(task_id)
|
package/package.json
CHANGED