mirror of
https://github.com/statbate/special-pancake.git
synced 2026-08-11 03:12:42 +00:00
update
This commit is contained in:
parent
4b0b928cef
commit
e42f70e789
3 changed files with 43 additions and 44 deletions
|
|
@ -93,8 +93,8 @@ func initClickhouse() {
|
|||
|
||||
func socketHandler() {
|
||||
|
||||
var(
|
||||
err error
|
||||
var (
|
||||
err error
|
||||
conn net.Conn
|
||||
)
|
||||
|
||||
|
|
@ -159,7 +159,7 @@ func fastStart() {
|
|||
workerData := Info{
|
||||
room: k,
|
||||
Id: v.Id,
|
||||
Auth: v.Auth,
|
||||
Auth: v.Auth,
|
||||
Proxy: v.Proxy,
|
||||
Online: v.Online,
|
||||
Start: v.Start,
|
||||
|
|
|
|||
|
|
@ -172,8 +172,8 @@ func saveDB() {
|
|||
Chanel string `json:"chanel"`
|
||||
Index int64 `json:"index"`
|
||||
}{
|
||||
Chanel: "chaturbate",
|
||||
Index: index["tokens"] / int64(seconds) * 3600 / 1000 * 5 / 100,
|
||||
Chanel: "chaturbate",
|
||||
Index: index["tokens"] / int64(seconds) * 3600 / 1000 * 5 / 100,
|
||||
})
|
||||
if err == nil {
|
||||
socketServer <- msg
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import (
|
|||
"net/http"
|
||||
//"net/url"
|
||||
//"strconv"
|
||||
"time"
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
|
|
@ -56,11 +56,11 @@ func announceCount() {
|
|||
rooms.Count <- 0
|
||||
l := <-rooms.Count
|
||||
msg, err := json.Marshal(struct {
|
||||
Chanel string `json:"chanel"`
|
||||
Count int `json:"count"`
|
||||
Chanel string `json:"chanel"`
|
||||
Count int `json:"count"`
|
||||
}{
|
||||
Chanel: "chaturbate",
|
||||
Count: l
|
||||
Chanel: "chaturbate",
|
||||
Count: l,
|
||||
})
|
||||
if err == nil {
|
||||
socketServer <- msg
|
||||
|
|
@ -140,10 +140,10 @@ func xWorker(workerData Info, u url.URL) {
|
|||
slog <- saveLog{Rid: workerData.Rid, Now: time.Now().Unix(), Mes: string(message)}
|
||||
|
||||
input := struct {
|
||||
Action int `json:"action"`
|
||||
Key string `json:"connectionkey"`
|
||||
Action int `json:"action"`
|
||||
Key string `json:"connectionkey"`
|
||||
Error jsoniter.RawMessage `json:"error"`
|
||||
Channel string `json:"channel"`
|
||||
Channel string `json:"channel"`
|
||||
Messages jsoniter.RawMessage `json:"messages"`
|
||||
}{}
|
||||
|
||||
|
|
@ -182,7 +182,6 @@ func xWorker(workerData Info, u url.URL) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
for {
|
||||
|
||||
select {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue