mirror of
https://github.com/YosysHQ/sby.git
synced 2025-08-08 14:21:25 +00:00
Cancel shouldn't use timeout logic
This commit is contained in:
parent
de51db08ab
commit
a6496d646f
1 changed files with 6 additions and 6 deletions
|
@ -151,8 +151,8 @@ class SbyProc:
|
||||||
if self.error_callback is not None:
|
if self.error_callback is not None:
|
||||||
self.error_callback(retcode)
|
self.error_callback(retcode)
|
||||||
|
|
||||||
def terminate(self, timeout=False):
|
def terminate(self, force=False):
|
||||||
if (self.task.opt_wait or self.wait) and not timeout:
|
if (self.task.opt_wait or self.wait) and not force:
|
||||||
return
|
return
|
||||||
if self.running:
|
if self.running:
|
||||||
if not self.silent:
|
if not self.silent:
|
||||||
|
@ -1306,18 +1306,18 @@ class SbyTask(SbyConfig):
|
||||||
self.models[model_name] = self.make_model(model_name)
|
self.models[model_name] = self.make_model(model_name)
|
||||||
return self.models[model_name]
|
return self.models[model_name]
|
||||||
|
|
||||||
def terminate(self, timeout=False):
|
def terminate(self, timeout=False, cancel=False):
|
||||||
if timeout:
|
if timeout:
|
||||||
self.timeout_reached = True
|
self.timeout_reached = True
|
||||||
for proc in list(self.procs_running):
|
for proc in list(self.procs_running):
|
||||||
proc.terminate(timeout=timeout)
|
proc.terminate(timeout or cancel)
|
||||||
for proc in list(self.procs_pending):
|
for proc in list(self.procs_pending):
|
||||||
proc.terminate(timeout=timeout)
|
proc.terminate(timeout or cancel)
|
||||||
if timeout:
|
if timeout:
|
||||||
self.update_unknown_props(dict(source="timeout"))
|
self.update_unknown_props(dict(source="timeout"))
|
||||||
|
|
||||||
def cancel(self):
|
def cancel(self):
|
||||||
self.terminate(True)
|
self.terminate(cancel=True)
|
||||||
self.update_status("CANCELLED")
|
self.update_status("CANCELLED")
|
||||||
|
|
||||||
def proc_failed(self, proc):
|
def proc_failed(self, proc):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue