Skip disabled MVLog jobs
This commit is contained in:
parent
8a87fe4cc6
commit
3ed06d95bc
1 changed files with 5 additions and 1 deletions
|
|
@ -23,6 +23,7 @@ ROOT = Path(__file__).resolve().parent
|
|||
MOVMAKER = ROOT / "movmaker.py"
|
||||
STATE_NAME = ".movmaker-state.json"
|
||||
LOCK_NAME = ".movmaker-lock"
|
||||
ENABLED_NAME = ".movmaker-enabled"
|
||||
|
||||
|
||||
def now() -> str:
|
||||
|
|
@ -69,7 +70,7 @@ entries = []
|
|||
for dirpath, dirnames, filenames in os.walk(root):
|
||||
dirnames[:] = [d for d in dirnames if d != '.movmaker-lock']
|
||||
for name in filenames:
|
||||
if name == '.movmaker-state.json':
|
||||
if name in {'.movmaker-state.json', '.movmaker-enabled', '.mvlog-hidden'}:
|
||||
continue
|
||||
path = os.path.join(dirpath, name)
|
||||
rel = os.path.relpath(path, root)
|
||||
|
|
@ -151,6 +152,9 @@ def render_job(local_input: Path, local_out: Path, extra_args: list[str]) -> Pat
|
|||
|
||||
def process_job(host: str, remote_root: str, job: str, work_dir: Path, extra_args: list[str], force: bool) -> None:
|
||||
job_dir = f"{remote_root}/in-dir/{job}"
|
||||
if not remote_file_exists(host, f"{job_dir}/{ENABLED_NAME}"):
|
||||
print(f"disabled: {job}")
|
||||
return
|
||||
if not acquire_lock(host, job_dir):
|
||||
print(f"skip locked: {job}")
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue