Skip to content

Conversation

@Sonivaibhav26
Copy link
Contributor

#41

@Sonivaibhav26 Sonivaibhav26 requested a review from souravray July 2, 2019 10:32
obj['_timestamp'] = time;
this.db.put(id, obj);
this._addToBucket(id, obj.data); // promise bnana hai kya
this._addToBucket(id, obj.data, time); // promise bnana hai kya
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the comment

next(data, err);
})
.flow(Batch.map({ number: 5, timeout: 30000, groupBy: ["to", "from"], attributes: ["num", "from"], type: "leveldb" },
.flow(Batch.map({ number: 5, timeout: 30000, groupBy: ["to", "from"], attributes: ["num", "from" , "_timestamp"], timestamp : "time" },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user will not be aware of _timestamp.
you should programmatically return two parameters in the result (similar to our group by parameters)

  1. the field mention in as timestamp
  2. time of message Arrival

console.error(`can't store store inactive`);
} else {
try {
let time;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

voluntarily capture both options.timesamp and message arrival timestamp and save them in the bucket.

throw new Error('Cannot construct Batch instances directly');
}
this._storeOptions = _.pick(options, ["number", "groupBy", "attributes", "timeout", "type", "path"]);
this._storeOptions = _.pick(options, ["number", "groupBy", "attributes", "timeout", "type", "path", "timestamp"]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

passed time stamp parameter should be treated similar to group by or attribute parameters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants