Only log, don't fatally exit
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Tyler 2021-06-12 01:46:41 -04:00
parent f2829c25d9
commit 8c4dff3fc5
1 changed files with 2 additions and 3 deletions

View File

@ -1,9 +1,9 @@
package eventloop
import (
log "github.com/sirupsen/logrus"
lua "github.com/yuin/gopher-lua"
luar "layeh.com/gopher-luar"
"log"
"sync"
"time"
)
@ -91,7 +91,6 @@ func (loop *EventLoop) schedule(repeating bool) int {
if fn, ok := loop.vm.Get(1).(*lua.LFunction); ok {
delay := loop.vm.CheckInt(2)
log.Println("Delay:", delay)
var args []lua.LValue
if loop.vm.GetTop() > 2 {
args = make([]lua.LValue, loop.vm.GetTop()-2)
@ -110,7 +109,7 @@ func (loop *EventLoop) schedule(repeating bool) int {
err := loop.vm.PCall(len(args), 0, fn)
if err != nil {
log.Fatalln("Error calling function:", err)
log.WithError(err).Warning("Error calling lua function for timer")
}
}
loop.jobCount++