Skip to content

Conversation

@jeremyfa
Copy link

This PR is just a cherry pick of @BretHudson's changes to generate ids.

The way the id is generated could probably be improved further, like by adding some actual randomness that is not depending on current time, in addition to the date-based logic, but I preferred to keep the changes as is.

Feel free to update the branch directly (you can push to it) if you have a better idea in how ids should be generated here.

@BretHudson
Copy link

Agreed on 'it could be better" :)

I kept nextUid++ to reduce the chance of a collision, in the case that some sort of batch operation generates a bunch of ids

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