MCPcopy
hub / github.com/vladmandic/sdnext / interrupt

Function interrupt

cli/sdapi.py:139–148  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

137
138
139async def interrupt():
140 res = await get('/sdapi/v1/progress?skip_current_image=true')
141 if 'state' in res and res.state.job_count > 0:
142 log.debug({ 'interrupt': res.state })
143 res = await post('/sdapi/v1/interrupt')
144 await asyncio.sleep(1)
145 return res
146 else:
147 log.debug({ 'interrupt': 'idle' })
148 return { 'interrupt': 'idle' }
149
150
151def interruptsync():

Callers 3

initFunction · 0.90
generate.pyFile · 0.90
sdapi.pyFile · 0.85

Calls 2

getFunction · 0.70
postFunction · 0.70

Tested by

no test coverage detected