Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoBuild is not being fired #351

Closed
ogero opened this issue Feb 11, 2017 · 1 comment
Closed

AutoBuild is not being fired #351

ogero opened this issue Feb 11, 2017 · 1 comment

Comments

@ogero
Copy link
Contributor

ogero commented Feb 11, 2017

Go: go version go1.7.3 windows/amd64
OS: Windows 7 Ultimate SP1 x64
BeeGo: beego 1.7.1 / bee v1.6.2
Command: bee run -downdoc=true -gendoc=true.
Output:

______
| ___ \
| |_/ /  ___   ___
| ___ \ / _ \ / _ \
| |_/ /|  __/|  __/
\____/  \___| \___| v1.6.2
2017/02/11 16:24:07 INFO     ? 0001 Using 'beego-demo' as 'appname'
2017/02/11 16:24:08 INFO     ? 0002 Loading default configuration...
2017/02/11 16:24:08 INFO     ? 0003 Initializing watcher...
2017/02/11 16:24:08 INFO     ? 0004 Watching: G:\gopath\src\beego-demo/controllers
2017/02/11 16:24:08 INFO     ? 0005 Watching: G:\gopath\src\beego-demo
2017/02/11 16:24:08 INFO     ? 0006 Watching: G:\gopath\src\beego-demo/models
2017/02/11 16:24:08 INFO     ? 0007 Watching: G:\gopath\src\beego-demo/routers
2017/02/11 16:24:08 INFO     ? 0008 Watching: G:\gopath\src\beego-demo/tests
2017/02/11 16:24:09 INFO     ? 0009 Generating the docs...
2017/02/11 16:24:09 SUCCESS  ? 0010 Docs generated!
2017/02/11 16:24:10 SUCCESS  ? 0011 Built Successfully!
2017/02/11 16:24:10 INFO     ? 0012 Restarting 'beego-demo'...
2017/02/11 16:24:10 SUCCESS  ? 0013 './beego-demo' is running...
2017/02/11 16:24:10 [I] [router.go:229] G:\gopath\src\beego-demo\controllers no changed
2017/02/11 16:24:17 [I] [asm_amd64.s:2086] http server Running on http://:9090
2017/02/11 16:24:36 INFO     ? 0014 Event fired: "G:\\gopath\\src\\beego-demo\\main.go": WRITE
2017/02/11 16:24:36 INFO     ? 0015 Skipping: "G:\\gopath\\src\\beego-demo\\main.go": WRITE
2017/02/11 16:24:53 INFO     ? 0016 Event fired: "G:\\gopath\\src\\beego-demo\\main.go": WRITE
2017/02/11 16:24:53 INFO     ? 0017 Skipping: "G:\\gopath\\src\\beego-demo\\main.go": WRITE

The main.go file changes are detected and correctly debounced, but the AutoBuild function is never called.
The culprit is this return.
So i wonder... if time.Sleep function is guaranteed to roughly sleep for the requested time, why is there that awful extra check after the Sleep call?
Also, the repeated call to time.Now to perform the After operation, is wrong, as the previous call value sould have been used.
Everything seems to work fine after taking all the fuzz away from that go func() to

go func() {
	// Wait 1s before autobuild until there is no file change.
	scheduleTime = time.Now().Add(1 * time.Second)
	AutoBuild(files, isgenerate)
}()

See #352

ogero added a commit to ogero/bee that referenced this issue Feb 11, 2017
astaxie added a commit that referenced this issue Feb 13, 2017
@amrfaissal
Copy link
Collaborator

PR merged.

Baihhh pushed a commit to Baihhh/bee that referenced this issue Jul 5, 2023
1. add 3 providers: apple, azuread(v1) and slack.
2. support importing providers from goth.

Signed-off-by: 0x2a <stevesough@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants