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
extended-job-api
TorchedSammy 2022-05-12 22:27:49 -04:00
parent 200fe1054f
commit 9a87d76969
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 1 additions and 0 deletions

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