dujunchen 3 kuukautta sitten
vanhempi
commit
35c5543aaa

+ 1 - 1
internal/app/ami/action/call.go

@@ -118,7 +118,7 @@ func InterruptRunningTask(toRunTask string) {
 
 	//same type return
 	if toRunTask == taskName {
-		if toRunTask == "PAD-ICP" || toRunTask == "PAD-TMS" {
+		if toRunTask == "PAD-ICP" || toRunTask == "PAD-TMS" || toRunTask == "PAD-OCC" {
 			lfshook.NewLogger().Infof("===InterruptRunningTask=ret==== ")
 			return
 		}

+ 1 - 0
internal/app/ami/action/index.go

@@ -376,6 +376,7 @@ func HandleAMI(event map[string]string) {
 			if priority.ICPAnswer == 0 && ICPQueue.Calls == "1" { //ICP did not answer any first call to the ICP queue ; Ready to Set Occ Queue Timer
 				toRunpriority := priority.GetPriorityByKey("PAD-ICP")
 
+				time.Sleep(time.Millisecond * 500) //wait high priority task start
 				_, taskTmp, ok := priority.RegistryTask.HighestPriorityRunningTask()
 				if ok {
 					lfshook.NewLogger().Infof("=1==QueueCallerJoin===runing:%d=====toRun:=%d==Status:%s", taskTmp, toRunpriority, event["ChannelStateDesc"])

+ 9 - 10
internal/app/stc/broadcast/stc-broadcast.go

@@ -217,12 +217,12 @@ func processPacket(packet []byte) {
 			action.InterruptRunningTask("PAD-TMS") //PAD-TMS interrupt other
 
 			AlarmHandleTMS(packet)
-			if active.QueueTimer != nil {
-				if active.SetTimer {
-					active.QueueTimer.Stop()
-					active.SetTimer = false
-				}
+
+			if active.SetTimer {
+				active.QueueTimer.Stop()
+				active.SetTimer = false
 			}
+
 		} else {
 			alstatus.PaStatus("", "PAD-TMS", "refuse")
 		}
@@ -237,11 +237,10 @@ func processPacket(packet []byte) {
 		if priority.CheckPriority("PAD-ICP") {
 
 			action.InterruptRunningTask("PAD-ICP") //PAD-ICP interrupt other
-			if active.QueueTimer != nil {
-				if active.SetTimer {
-					active.QueueTimer.Stop()
-					active.SetTimer = false
-				}
+
+			if active.SetTimer {
+				active.QueueTimer.Stop()
+				active.SetTimer = false
 			}
 
 			AlarmHandleICP(packet) //