Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to isolate tasks in their own directory? #87

Open
Asutu opened this issue Sep 18, 2023 · 0 comments
Open

How to isolate tasks in their own directory? #87

Asutu opened this issue Sep 18, 2023 · 0 comments

Comments

@Asutu
Copy link

Asutu commented Sep 18, 2023

I'm trying to isolate a task in its own directory because it can generate a large number of files. I saw tempdir and thought that it could serve this purpose, but when I run the task with tempdir=True it returns an empty list, whereas by omitting this switch it does return all files.

The task:

@task(tempdir=True)
def splitter(data: File) -> List[File]:
    return script(
        f'''
        split -d -l 2 mydata.txt part.
        ''',
        inputs = [data.stage('mydata.txt')],
        outputs = [File(f).stage(str(f)) for f in glob_file('part.*')],
    )

Maybe tempdir=True has a different purpose? In any case, what is the recommended approach to isolate tasks in their own directory. (I'm running redun locally in my own laptop)

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant