testtest
This commit is contained in:
parent
06dc7c7662
commit
665f3fff73
3
def.go
3
def.go
@ -324,7 +324,8 @@ const (
|
|||||||
SQLIdentifyMsgWorkers = 6
|
SQLIdentifyMsgWorkers = 6
|
||||||
SQLMsgIdentifyQueueSize = 100
|
SQLMsgIdentifyQueueSize = 100
|
||||||
SQLMsgRescanJobSize = 25
|
SQLMsgRescanJobSize = 25
|
||||||
SQLJobWorkers = 12
|
JobWorkers = 12
|
||||||
|
JobQueueSize = 100
|
||||||
TGCmdWorkers = 3
|
TGCmdWorkers = 3
|
||||||
TGCmdQueueSize = 100
|
TGCmdQueueSize = 100
|
||||||
MQTGCmdWorkers = 3
|
MQTGCmdWorkers = 3
|
||||||
|
2
job.go
2
job.go
@ -316,7 +316,7 @@ func jobPillage(j Job) {
|
|||||||
|
|
||||||
s := TGCommand{
|
s := TGCommand{
|
||||||
Type: commandSendMsg,
|
Type: commandSendMsg,
|
||||||
Text: fmt.Sprintf("No outcome for the pillage yet(%s)", m.Date.Format(time.RFC3339)),
|
Text: fmt.Sprintf("No outcome for the pillage yet"),
|
||||||
ToUserID64: j.UserID64,
|
ToUserID64: j.UserID64,
|
||||||
}
|
}
|
||||||
TGCmdQueue <- s
|
TGCmdQueue <- s
|
||||||
|
4
main.go
4
main.go
@ -139,8 +139,8 @@ func main() {
|
|||||||
for w := 1; w <= SQLIdentifyMsgWorkers; w++ {
|
for w := 1; w <= SQLIdentifyMsgWorkers; w++ {
|
||||||
go SQLIdentifyMsgWorker(w, SQLMsgIdentifyQueue)
|
go SQLIdentifyMsgWorker(w, SQLMsgIdentifyQueue)
|
||||||
}
|
}
|
||||||
for w := 1; w <= jobWorkers; w++ {
|
for w := 1; w <= JobWorkers; w++ {
|
||||||
go jobWorker(w, JobQueue)
|
go JobWorker(w, JobQueue)
|
||||||
}
|
}
|
||||||
for w := 1; w <= TGCmdWorkers; w++ {
|
for w := 1; w <= TGCmdWorkers; w++ {
|
||||||
go TGCmdWorker(w, b, TGCmdQueue)
|
go TGCmdWorker(w, b, TGCmdQueue)
|
||||||
|
@ -297,7 +297,7 @@ func SQLJobWorker() {
|
|||||||
log.Printf("SQLJobWorker : Closing.")
|
log.Printf("SQLJobWorker : Closing.")
|
||||||
}
|
}
|
||||||
|
|
||||||
func jobWorker(id int, jobs <-chan Job) {
|
func JobWorker(id int, jobs <-chan Job) {
|
||||||
//log.Printf("jobWorker[" + strconv.Itoa(id) + "] : Starting.")
|
//log.Printf("jobWorker[" + strconv.Itoa(id) + "] : Starting.")
|
||||||
for j := range jobs {
|
for j := range jobs {
|
||||||
switch j.JobTypeID {
|
switch j.JobTypeID {
|
||||||
|
Loading…
Reference in New Issue
Block a user