mirror of https://github.com/Hilbis/Hilbish
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 falseextended-job-api
parent
200fe1054f
commit
9a87d76969
1
job.go
1
job.go
|
@ -59,6 +59,7 @@ func (j *job) lua() rt.Value {
|
||||||
func (j *job) luaStop(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
|
func (j *job) luaStop(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
|
||||||
if j.running {
|
if j.running {
|
||||||
j.stop()
|
j.stop()
|
||||||
|
j.finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.Next(), nil
|
return c.Next(), nil
|
||||||
|
|
Loading…
Reference in New Issue