()
| 137 | |
| 138 | |
| 139 | async 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 | |
| 151 | def interruptsync(): |
no test coverage detected