Skip to content

Commit

Permalink
#1 add delay in list directory process
Browse files Browse the repository at this point in the history
  • Loading branch information
sapetnioc committed Jan 28, 2022
1 parent fd81ab6 commit 9db0140
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bv_use_cases/simplest/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import os
import time

from soma.controller import path, directory, List, field
from capsul.api import Process

Expand All @@ -10,7 +12,7 @@ class ListDirectory(Process):
result : field(type_=List[path()], doc='the output', output=True)

def execute(self, context):
self.result = os.listdir(self.path)
self.result = list_directory(self.path)


def list_directory(
Expand All @@ -19,4 +21,5 @@ def list_directory(
'''
Return a list containing the names of the files in the directory.
'''
time.sleep(3)
return os.listdir(path)

0 comments on commit 9db0140

Please sign in to comment.