-
Notifications
You must be signed in to change notification settings - Fork 14
[RAINCATCH-1151] Add hashed index to id field for generated collections #92
Conversation
I think that we may even have some separate raincatcher-demo/demo-data package.This will make demo app clean for people wanting framework and sales. leaving up to you if we should do it in this PR |
Changes Unknown when pulling 2f0d58b on RAINCATCH-1151-mongo-indexing into ** on master**. |
function updateWorkorderDates() { | ||
const today = new Date(); | ||
const tomorrow = new Date(); | ||
tomorrow.setDate(today.getDate() + 4); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is no longer needed as I have disabled this fields. They are provided by step when starting
@@ -0,0 +1,52 @@ | |||
{ | |||
"name": "@raincatcher/demo-data", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raincatcher-demo/sample-data
- to simplify productization we may need two teams.
That will help us to differenciate between supported modules and examples.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's totally okay if it helps in that front. For the local dev workflow and lerna nothing would change, only for npm. (and arguably the node_modules/@raincatcher
+ node_modules/@raincatcher-demo
directory structure, which shouldn't matter)
0860f29
to
1c58cd8
Compare
Changes Unknown when pulling 1c58cd8 on RAINCATCH-1151-mongo-indexing into ** on master**. |
1 similar comment
Changes Unknown when pulling 1c58cd8 on RAINCATCH-1151-mongo-indexing into ** on master**. |
Changes Unknown when pulling fc4b312 on RAINCATCH-1151-mongo-indexing into ** on master**. |
Changes Unknown when pulling e7d7777 on RAINCATCH-1151-mongo-indexing into ** on master**. |
@@ -70,7 +71,8 @@ function wfmApiSetup(app: express.Express, connectionPromise: Promise<any>) { | |||
// Mount api | |||
const api = new WfmRestApi(); | |||
const role = config.security.adminRole; | |||
app.use('/api', securityMiddleware.protect(role), api.createWFMRouter()); | |||
app.use('/api', securityMiddleware.protect(role)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JameelB - looks like bug in security middleware prevent from getting proper results.
This looks like workaround for the moment but we will need to get this tested.
Motivation
Add indexing on custom
id
field when generating demo data.Description
Add extra logging and hashed indexing on the id field.
Progress
Additional Notes
To verify:
raincatcher
mongodb databasedemo-server
to trigger the seeding of the demo datadb.collection('workflows').getIndexes()
anddb.collection('workorders').getIndexes()
on a mongo console