Skip to content

Commit

Permalink
apache#79 消息推送跟踪
Browse files Browse the repository at this point in the history
  • Loading branch information
develpoerX committed Dec 24, 2020
1 parent 18a847b commit 75dbd4d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions deployments/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ db.createCollection( "polling_detail", {
} );

//index
db.kv.createIndex({"id": 1}, { unique: true });
db.kv.createIndex({key: 1, label_format: 1,domain:1,project:1},{ unique: true });
db.kv_revision.createIndex( { "delete_time": 1 }, { expireAfterSeconds: 7 * 24 * 3600 });
db.label.createIndex({"id": 1}, { unique: true });
db.label.createIndex({format: 1,domain:1,project:1},{ unique: true});
db.polling_detail.createIndex({timestamp: 1}, { expireAfterSeconds: 7 * 24 * 3600});
db.counter.createIndex({name: 1,domain:1},{ unique: true });
db.kv.createIndex({"id": 1}, { unique: true } );
db.kv.createIndex({key: 1, label_format: 1,domain:1,project:1},{ unique: true } );
db.kv_revision.createIndex( { "delete_time": 1 }, { expireAfterSeconds: 7 * 24 * 3600 } );
db.label.createIndex({"id": 1}, { unique: true } );
db.label.createIndex({format: 1,domain:1,project:1},{ unique: true } );
db.polling_detail.createIndex({timestamp: 1}, { expireAfterSeconds: 7 * 24 * 3600 } );
db.counter.createIndex({name: 1,domain:1},{ unique: true } );
db.view.createIndex({"id": 1}, { unique: true } );
db.view.createIndex({display:1,domain:1,project:1},{ unique: true });
db.view.createIndex({display:1,domain:1,project:1},{ unique: true } );
//db config
db.setProfilingLevel(1, {slowms: 80, sampleRate: 1} );
db.setProfilingLevel(1, {slowms: 80, sampleRate: 1 } );
2 changes: 1 addition & 1 deletion pkg/model/db_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type PollingDetail struct {
URLPath string `json:"url_path,omitempty" bson:"url_path," yaml:"url_path,omitempty"`
ResponseBody []*KVDoc `json:"kv,omitempty" bson:"kv," yaml:"kv,omitempty"`
ResponseCode int `json:"response_code,omitempty" bson:"response_code," yaml:"response_code,omitempty"`
Timestamp time.Time `json:"timestamp,omitempty" yaml:"timestamp,omitempty"`
Timestamp time.Time `json:"timestamp,omitempty" yaml:"timestamp,omitempty"`
}

// UpdateKVRequest is db struct, it contains kv update request params
Expand Down
2 changes: 1 addition & 1 deletion server/resource/v1/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import (
const (
HeaderUserAgent = "User-Agent"
HeaderSessionID = "X-Session-Id"
HeaderSessionGroup = "X-Session-Group"
HeaderSessionGroup = "X-Session-Group"
AttributeDomainKey = "domain"

FmtReadRequestError = "decode request body failed: %v"
Expand Down

0 comments on commit 75dbd4d

Please sign in to comment.