Skip to content

Instantly share code, notes, and snippets.

@aidapsibr
Last active March 26, 2019 06:25
Show Gist options
  • Save aidapsibr/f10c110e02fa2879c23b96ff2fe7ca24 to your computer and use it in GitHub Desktop.
Save aidapsibr/f10c110e02fa2879c23b96ff2fe7ca24 to your computer and use it in GitHub Desktop.
Given an existing aggregate record, When an event is published, Then aggregate is updated by SUM
{
"subscriptionId" : "8758a65a-1e46-4468-a2e2-f80d4bdfba7c",
"resourceSetId" : "53d43eff-a5a2-41f1-a361-75b7c7b508bb",
"entityStatistics" : {
"folders" : {
"scanned" : 1,
"added" : 1,
"modified" : 0,
"deleted" : 0
},
"files" : {
"scanned" : 5,
"added" : 5,
"modified" : 0,
"deleted" : 0,
"contentSize" : 1048576
}
}
}
{
"id" : "d75cb051-1f52-4e38-95d7-948a302638e2",
"subscriptionId" : "8758a65a-1e46-4468-a2e2-f80d4bdfba7c",
"resourceSetId" : "53d43eff-a5a2-41f1-a361-75b7c7b508bb",
"started" : "2019-03-25T00:00:00",
"finished" : "2019-03-25T00:01:00",
"wasSuccess": true,
"entityStatistics" : {
"folders" : {
"scanned" : 1,
"added" : 1,
"modified" : 0,
"deleted" : 0
},
"files" : {
"scanned" : 10,
"added" : 10,
"modified" : 0,
"deleted" : 0,
"contentSize" : 2097152
}
}
}
{
"subscriptionId" : "8758a65a-1e46-4468-a2e2-f80d4bdfba7c",
"resourceSetId" : "53d43eff-a5a2-41f1-a361-75b7c7b508bb",
"entityStatistics" : {
"folders" : {
"scanned" : 2,
"added" : 2,
"modified" : 0,
"deleted" : 0
},
"files" : {
"scanned" : 15,
"added" : 15,
"modified" : 0,
"deleted" : 0,
"contentSize" : 3145728
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment