Skip to content

Commit

Permalink
update default config, fix bug where lane is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
realtux committed Apr 13, 2017
1 parent c68518b commit 5bb335d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/dispenserd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ var config options

func ConfigLoad() {
config = options{
Address: "127.0.0.1:8282",
PersistQueue: false,
PersistInterval: 60,
Address: "0.0.0.0:8282",
PersistQueue: true,
PersistInterval: 3600,
ThrottleReceive: false,
ThrottleSchedule: false,
}
Expand Down
6 changes: 3 additions & 3 deletions src/dispenserd/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func ServiceSchedule(res http.ResponseWriter, req *http.Request) {
final_job.Priority = incoming_job.Priority
}

if incoming_job.Lane != nil {
if incoming_job.Lane != nil && *incoming_job.Lane != "" {
final_job.Lane = incoming_job.Lane
}

Expand Down Expand Up @@ -192,7 +192,7 @@ func ServiceReceiveBlock(res http.ResponseWriter, req *http.Request) {
incoming_data := json.NewDecoder(req.Body)
incoming_data.Decode(&incoming_request)

if incoming_request.Lane == nil {
if incoming_request.Lane == nil || *incoming_request.Lane == "" {
current_lane = "main"
} else {
CreateIndex(*incoming_request.Lane)
Expand Down Expand Up @@ -244,7 +244,7 @@ func ServiceReceiveNoBlock(res http.ResponseWriter, req *http.Request) {
incoming_data := json.NewDecoder(req.Body)
incoming_data.Decode(&incoming_request)

if incoming_request.Lane == nil {
if incoming_request.Lane == nil || *incoming_request.Lane == "" {
current_lane = "main"
} else {
CreateIndex(*incoming_request.Lane)
Expand Down

0 comments on commit 5bb335d

Please sign in to comment.