Skip to content

Instantly share code, notes, and snippets.

@mvidalgarcia
Last active February 4, 2022 15:17
Show Gist options
  • Save mvidalgarcia/59b0b07afa73b4bb8b2c5c1bc37f7b41 to your computer and use it in GitHub Desktop.
Save mvidalgarcia/59b0b07afa73b4bb8b2c5c1bc37f7b41 to your computer and use it in GitHub Desktop.
Delete all your workflows in REANA cluster.
from reana_db.models import User, Workflow
from reana_db.database import Session
email = "john.doe@example.org"
me = User.query.filter_by(email=email).one()
for wf in me.workflows:
for wr in wf.resources:
Session.delete(wr)
Session.delete(wf)
Session.commit()
rm -rf /var/reana/users/<USER_UUID>/workflows/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment