SIGINT handler to use while code is running or request being fulfilled
(self, *args)
| 168 | raise SystemExitFromCodeRunner(request.args) |
| 169 | |
| 170 | def sigint_handler(self, *args): |
| 171 | """SIGINT handler to use while code is running or request being |
| 172 | fulfilled""" |
| 173 | if greenlet.getcurrent() is self.code_context: |
| 174 | logger.debug("sigint while running user code!") |
| 175 | raise KeyboardInterrupt() |
| 176 | else: |
| 177 | logger.debug( |
| 178 | "sigint while fulfilling code request sigint handler " |
| 179 | "running!" |
| 180 | ) |
| 181 | self.sigint_happened_in_main_context = True |
| 182 | |
| 183 | def _blocking_run_code(self): |
| 184 | try: |
nothing calls this directly
no outgoing calls
no test coverage detected