Skip to content

Commit

Permalink
Added the ttl for job entitytype in tag table
Browse files Browse the repository at this point in the history
  • Loading branch information
victor committed Aug 17, 2020
1 parent f9ad29f commit 9c42a0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions common/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const (
const (
TASK_TAG_TTL = 6
DEPLOY_JOB_TAG_TTL = 6
JOB_TAG_TTL = 6
)

var RequiredAPIVariables = []string{
Expand Down
2 changes: 2 additions & 0 deletions common/db/tag_store/dynamo.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ func (d *DynamoTagStore) Insert(tag models.Tag) error {
//Add TTL value
if tag.EntityType == "task" {
d.addTTLValue(tag, config.TASK_TAG_TTL)
} else if tag.EntityType == "job" {
d.addTTLValue(tag, config.JOB_TAG_TTL)
} else if tag.EntityType == "deploy" && strings.HasPrefix(tag.EntityID, "job.") {
d.addTTLValue(tag, config.DEPLOY_JOB_TAG_TTL)
}
Expand Down

0 comments on commit 9c42a0b

Please sign in to comment.