-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added --time option to fre pp wrapper, and standalone fre pp trigger
- Loading branch information
Chris Blanton
authored and
Chris Blanton
committed
Nov 26, 2024
1 parent
01023ef
commit bdfa7f5
Showing
3 changed files
with
51 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env python | ||
''' fre pp trigger ''' | ||
|
||
import subprocess | ||
import click | ||
|
||
def trigger(experiment, platform, target, time): | ||
""" | ||
Trigger the pp-starter task for the time indicated | ||
""" | ||
|
||
name = experiment + '__' + platform + '__' + target | ||
cmd = f"cylc trigger {name}//{time}/pp-starter" | ||
subprocess.run(cmd, shell=True, check=True, timeout=30) | ||
|
||
|
||
@click.command() | ||
def _trigger(experiment, platform, target, time): | ||
''' entry point to trigger for click ''' | ||
return trigger(experiment, platform, target, time) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters