2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-04-02 03:33:22 +00:00

fix: finish job on lua job stop function

makesdoc  sure that a job is finalized by throwing
the job.done hook and setting its running status
to false
This commit is contained in:
TorchedSammy 2022-05-12 22:27:49 -04:00
parent 200fe1054f
commit 9a87d76969
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD

1
job.go
View File

@ -59,6 +59,7 @@ func (j *job) lua() rt.Value {
func (j *job) luaStop(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
if j.running {
j.stop()
j.finish()
}
return c.Next(), nil