This repository was archived by the owner on Jan 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +190
-184
lines changed
Expand file tree Collapse file tree 3 files changed +190
-184
lines changed Original file line number Diff line number Diff line change @@ -33,39 +33,6 @@ func cronAlive() {
3333 cron .StartBlocking ()
3434}
3535
36- func Init () {
37- if aliveToggle == true {
38- return
39- }
40- aliveToggle = true
41- servers = [2 ]serverType {
42- {
43- Name : "NY-1" ,
44- Id : 1 ,
45- CfxId : "2epova" ,
46- DirectUrl : "http://v1.api.tycoon.community/main" ,
47- CfxUrl : "https://tycoon-2epova.users.cfx.re" ,
48- AliveUrl : "" ,
49- Alive : false ,
50- },
51- {
52- Name : "NY-2" ,
53- Id : 2 ,
54- CfxId : "njyvop" ,
55- DirectUrl : "http://v1.api.tycoon.community/beta" ,
56- CfxUrl : "https://tycoon-njyvop.users.cfx.re/status" ,
57- AliveUrl : "" ,
58- Alive : false ,
59- },
60- }
61- // AliveServers.Primary_server = servers[0].AliveUrl
62- AliveServers .Primary_server = ""
63- AliveServers .Servers = servers
64- checkServers ()
65- // cron.Every("5s").Do(checkServers)
66- go cronAlive ()
67- }
68-
6936func checkServers () {
7037 aliveDown := 0
7138
Original file line number Diff line number Diff line change 1+ package ttRequests
2+
3+ func Init () {
4+ initAlive ()
5+ }
6+
7+ func initAlive () {
8+ if aliveToggle == true {
9+ return
10+ }
11+ aliveToggle = true
12+ servers = [2 ]serverType {
13+ {
14+ Name : "NY-1" ,
15+ Id : 1 ,
16+ CfxId : "2epova" ,
17+ DirectUrl : "http://v1.api.tycoon.community/main" ,
18+ CfxUrl : "https://tycoon-2epova.users.cfx.re/status" ,
19+ AliveUrl : "" ,
20+ Alive : false ,
21+ },
22+ {
23+ Name : "NY-2" ,
24+ Id : 2 ,
25+ CfxId : "njyvop" ,
26+ DirectUrl : "http://v1.api.tycoon.community/beta" ,
27+ CfxUrl : "https://tycoon-njyvop.users.cfx.re/status" ,
28+ AliveUrl : "" ,
29+ Alive : false ,
30+ },
31+ }
32+ // AliveServers.Primary_server = servers[0].AliveUrl
33+ AliveServers .Primary_server = ""
34+ AliveServers .Servers = servers
35+ checkServers ()
36+ // cron.Every("5s").Do(checkServers)
37+ go cronAlive ()
38+ }
You can’t perform that action at this time.
0 commit comments