MCPcopy Create free account
hub / github.com/MG-RAST/Shock / getQuery

Method getQuery

shock-server/node/expire.go:51–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49}
50
51func (nr *NodeReaper) getQuery() (query bson.M) {
52 hasExpire := bson.M{"expiration": bson.M{"$exists": true}} // has the field
53 toExpire := bson.M{"expiration": bson.M{"$ne": time.Time{}}} // value has been set, not default
54 isExpired := bson.M{"expiration": bson.M{"$lt": time.Now()}} // value is too old
55 query = bson.M{"$and": []bson.M{hasExpire, toExpire, isExpired}}
56 return
57}

Callers 1

HandleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected