This repository was archived by the owner on Mar 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change 6
6
"errors"
7
7
"log"
8
8
"os"
9
+ "time"
9
10
10
11
com "github.com/sqlitebrowser/dbhub.io/common"
11
12
"github.com/sqlitebrowser/dbhub.io/common/config"
@@ -66,18 +67,18 @@ func main() {
66
67
go com .JobQueueListen ()
67
68
68
69
// Launch goroutine event generator for checking submitted jobs
69
- // TODO : This seems to work fine, but is kind of a pita to have enabled while developing this code atm. So we disable it for now.
70
+ // NOTE : This seems to work fine, but is kind of a pita to have enabled while developing this code atm. So we disable it for now.
70
71
// TODO: Instead of this, should we run some code on startup of the live nodes that checks the database for
71
72
// (recent) unhandled requests, and automatically generates a JobQueueCheck() event if some are found?
72
- // go func() {
73
- // for {
74
- // // Tell the JobQueueCheck() goroutine to check for newly submitted jobs
75
- // com.CheckJobQueue <- struct{}{}
76
- //
77
- // // Wait a second before the next check
78
- // time.Sleep(1 * time.Second)
79
- // }
80
- // }()
73
+ go func () {
74
+ for {
75
+ // Tell the JobQueueCheck() goroutine to check for newly submitted jobs
76
+ com .CheckJobQueue <- struct {}{}
77
+
78
+ // Wait a second before the next check
79
+ time .Sleep (1 * time .Second )
80
+ }
81
+ }()
81
82
82
83
log .Printf ("%s: listening for requests" , config .Conf .Live .Nodename )
83
84
You can’t perform that action at this time.
0 commit comments