Use proper random container name

This commit is contained in:
Thomas Boerger 2017-05-12 15:02:24 +02:00
parent 697cb0ea0e
commit 86ca01561b
No known key found for this signature in database
GPG key ID: 5A388F55283960B6

View file

@ -5,6 +5,7 @@ import (
"crypto/sha256"
"encoding/json"
"fmt"
"math/rand"
"regexp"
"strconv"
"time"
@ -39,6 +40,10 @@ import (
var skipRe = regexp.MustCompile(`\[(?i:ci *skip|skip *ci)\]`)
func init() {
rand.Seed(time.Now().UnixNano())
}
func GetQueueInfo(c *gin.Context) {
c.IndentedJSON(200,
Config.Services.Queue.Info(c),
@ -492,7 +497,7 @@ func (b *builder) Build() ([]*buildItem, error) {
fmt.Sprintf(
"%d_%d",
proc.ID,
time.Now().Unix(),
rand.Int(),
),
),
compiler.WithEnviron(proc.Environ),