-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add Cylc Clean Support #323
Changes from all commits
b5b9425
5fbcfd1
cca15e3
670fcd1
17b2b0b
9cb564d
4023a37
5baddf2
185edf0
60355d0
bdbc5b2
cc7ccb6
1accec8
ff85529
b2185cd
9138aaa
3ecb249
ca399dc
9242db1
3a8ab0b
01c5868
31d9097
6696835
deee2a5
11c86ef
6733cab
69332cf
00c39ec
cf7a76b
113183c
f050ab6
1145ede
5ae1703
875f2a8
3299e00
aca76f9
d610994
2c3aafd
b698883
f1d3a6c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -211,9 +211,57 @@ class Arguments: | |
result = GenericScalar() | ||
|
||
|
||
class Clean(graphene.Mutation): | ||
class Meta: | ||
description = sstrip(''' | ||
Clean a workflow from the run directory. | ||
''') | ||
resolver = partial(mutator, command='clean') | ||
|
||
class Arguments: | ||
workflows = graphene.List(WorkflowID, required=True) | ||
rm = graphene.String( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tested it out with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes - according to the documentation it can be a colon-separated list of strings. I've added something to deal. |
||
default_value='', | ||
description=sstrip(''' | ||
Only clean the specified subdirectories (or files) in | ||
the run directory, rather than the whole run | ||
|
||
Can be a colon separated list: | ||
E.g. '.service/db:log:share:work'. | ||
''') | ||
) | ||
local_only = graphene.Boolean( | ||
default_value=False, | ||
description=sstrip(''' | ||
Only clean on the local filesystem (not remote hosts). | ||
''') | ||
) | ||
remote_only = graphene.Boolean( | ||
default_value=False, | ||
description=sstrip(''' | ||
Only clean on remote hosts (not the local filesystem). | ||
''') | ||
) | ||
debug = graphene.Boolean( | ||
default_value=False, | ||
description=sstrip(''' | ||
Output developer information and show exception tracebacks. | ||
''') | ||
) | ||
no_timestamp = graphene.Boolean( | ||
default_value=False, | ||
description=sstrip(''' | ||
Don't timestamp logged messages. | ||
''') | ||
) | ||
|
||
result = GenericScalar() | ||
|
||
|
||
class UISMutations(Mutations): | ||
|
||
play = _mut_field(Play) | ||
clean = _mut_field(Clean) | ||
|
||
|
||
schema = graphene.Schema( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor point but this defaults to 120 in cylc flow. Wonder if it would be worth making them consistent, for documentation purposes mainly.
I think 600 may seem like the better timeout than 120, since nfs and file deletions can perhaps take a while?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the CLI 120 is the default, but the user can over-ride it.
In the UI I haven't exposed it to the user, so I think it's reasonable to set it longer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason not to expose it to the user? (Happy to leave this as is for now, but perhaps there should be a question issue for how long the timeouts should be on the CLI vs UI and whether to expose it to user on the UI)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't remember the reason, but I think @oliver-sanders and I agreed not to - I think it ought to be documented for discussion...