Skip to content

Commit

Permalink
test sleeping
Browse files Browse the repository at this point in the history
  • Loading branch information
gjedlicska committed Oct 25, 2023
1 parent 3a33297 commit c526802
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit c526802

Please sign in to comment.