Skip to content

Commit

Permalink
fix: fix creation timestamp and last update timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
ctron committed Mar 2, 2022
1 parent d997804 commit a8ca4ee
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions doppelgaenger-input/src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,12 @@ impl Processor {
return Ok(());
}

update.insert(
"lastUpdateTimestamp".to_string(),
Bson::String("$currentDate".to_string()),
);

let update = doc! {
"$currentDate": {
"lastUpdateTimestamp": { "$type": "timestamp" },
},
"$setOnInsert": {
"creationTimestamp": "$currentDate"
"creationTimestamp": "$$NOW"
},
"$inc": {
"revision": 1,
Expand Down

0 comments on commit a8ca4ee

Please sign in to comment.