#!/usr/bin/env python3 """Release an actually stale v1 process after v2 commits, rather than mocking SQL.""" import hashlib,json,subprocess,time,uuid from pipeline import ROOT,C,dc,sql,check,meta,wait_status,content,upload,start_worker def main(): a,b,e,chat=C.bootstrap();dc('stop','worker');att,data=upload(a,chat);name='lab-stale-'+uuid.uuid4().hex[:10] dc('run','-d','--no-deps','--name',name,'-e','LAB_FAULT_POINT=before_write','worker') try: deadline=time.monotonic()+45 while time.monotonic()