Skip to content

Commit

Permalink
Added loader image for thrust
Browse files Browse the repository at this point in the history
  • Loading branch information
gentee committed Oct 27, 2016
1 parent eb65dfe commit 96292c8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions packages/daylight/daylight_start.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ func Start(dir string, thrustWindowLoder *window.Window) {
panic(err)
}

startData := map[string]int64{"install":1,"config":1,"queue_tx":99999,"log_transactions":1,"transactions_status":99999, "block_chain": 1, "info_block": 1, "dlt_wallets":1, "confirmations": 9999999, "full_nodes":1, "system_parameters":4, "my_node_keys":99999, "transactions":999999}
startData := map[string]int64{"install": 1, "config": 1, "queue_tx": 99999, "log_transactions": 1, "transactions_status": 99999, "block_chain": 1, "info_block": 1, "dlt_wallets": 1, "confirmations": 9999999, "full_nodes": 1, "system_parameters": 4, "my_node_keys": 99999, "transactions": 999999}
for _, table := range allTable {
count, err := utils.DB.Single(`SELECT count(*) FROM ` + table).Int64()
if err != nil {
Expand Down Expand Up @@ -392,7 +392,7 @@ func Start(dir string, thrustWindowLoder *window.Window) {
thrustWindowLoder.Close()
thrustWindow := thrust.NewWindow(thrust.WindowOptions{
RootUrl: BrowserHttpHost,
Size: commands.SizeHW{Width: 1024, Height: 600},
Size: commands.SizeHW{Width: 1024, Height: 800},
})
thrustWindow.HandleEvent("*", func(cr commands.EventResult) {
fmt.Println("HandleEvent", cr)
Expand Down
19 changes: 10 additions & 9 deletions packages/tcpserver/tcpserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ package tcpserver

import (
"flag"
"fmt"
"github.com/EGaaS/go-mvp/packages/utils"
"github.com/op/go-logging"
// "fmt"
"net"
"runtime"
// "runtime"
"sync"

"github.com/EGaaS/go-mvp/packages/utils"
"github.com/op/go-logging"
)

var (
Expand All @@ -38,23 +39,23 @@ func init() {

type TcpServer struct {
*utils.DCDB
Conn net.Conn
Conn net.Conn
}

func (t *TcpServer) deferClose() {
t.Conn.Close()
mutex.Lock()
counter--
fmt.Println("--", counter)
// fmt.Println("--", counter)
mutex.Unlock()
}

func (t *TcpServer) HandleTcpRequest() {

fmt.Println("NumCPU:", runtime.NumCPU(),
/* fmt.Println("NumCPU:", runtime.NumCPU(),
" NumGoRoutine:", runtime.NumGoroutine(),
" t.counter:", counter)

*/
var err error

log.Debug("HandleTcpRequest from %v", t.Conn.RemoteAddr())
Expand All @@ -67,7 +68,7 @@ func (t *TcpServer) HandleTcpRequest() {
return
} else {
counter++
fmt.Println("++", counter)
// fmt.Println("++", counter)
}
mutex.Unlock()

Expand Down
Binary file added static/img/main_loader.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 96292c8

Please sign in to comment.