test sleeping

This commit is contained in:
Gergő Jedlicska
2023-10-25 19:13:15 +02:00
parent 3a33297f91
commit c526802a6d
+7
View File
@@ -3,6 +3,8 @@
use the automation_context module to wrap your function in an Autamate context helper
"""
import time
from pydantic import Field
from speckle_automate import (
AutomateBase,
@@ -46,6 +48,11 @@ def automate_function(
# the context provides a conveniet way, to receive the triggering version
version_root_object = automate_context.receive_version()
sleep_cycles = 10
for i in range(sleep_cycles):
print(f"sleeping {i}/{sleep_cycles}")
time.sleep(5)
count = 0
for b in flatten_base(version_root_object):
if b.speckle_type == function_inputs.forbidden_speckle_type: