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

Better support/documentation for repairing corrupt workspaces #8

Open
csadorf opened this issue Nov 21, 2017 · 0 comments
Open

Better support/documentation for repairing corrupt workspaces #8

csadorf opened this issue Nov 21, 2017 · 0 comments
Labels

Comments

@csadorf
Copy link
Contributor

csadorf commented Nov 21, 2017

Original report by Jens Glaser (Bitbucket: jens_glaser, GitHub: jglaser).


The project.repair() functionality is useful, but it doesn't always succeed e.g. if the signac_statepoint.json is an empty file for some reason.

In that case one would want to be able to remove the entire job directory. Since this is a dangerous operation, it would make sense to do it manually. However, some documentation example for this use case would be useful.

I am using the following script to clean my workspace from broken jobs:

import signac

from signac.contrib import errors

project = signac.get_project()

try:
    project.repair()
except signac.contrib.errors.JobsCorruptedError as e:
    import shutil
    for job in e.job_ids:
        print('Removing job {}'.format(job))
        shutil.rmtree('workspace/'+job+'/')
@csadorf csadorf transferred this issue from glotzerlab/signac Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants