-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement reactive and non-reactive management of tasks to perform th…
…e stress test
- Loading branch information
1 parent
6d0b968
commit 3c0ad07
Showing
25 changed files
with
3,479 additions
and
6,419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,6 @@ [email protected] # Enable TypeScript syntax in .ts and .tsx modules | |
[email protected] # Server-side component of the `meteor shell` command | ||
[email protected] # Update client in development without reloading the page | ||
|
||
|
||
[email protected] # Define static page content in .html files | ||
react-meteor-data # React higher-order component for reactively tracking Meteor data | ||
tasks-common |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,7 @@ [email protected] | |
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,7 @@ | ||
import { Meteor } from 'meteor/meteor'; | ||
import { LinksCollection } from '/imports/api/links'; | ||
import { initializeTaskCollection, registerTaskApi } from 'meteor/tasks-common'; | ||
|
||
async function insertLink({ title, url }) { | ||
await LinksCollection.insertAsync({ title, url, createdAt: new Date() }); | ||
} | ||
|
||
Meteor.startup(async () => { | ||
// If the Links collection is empty, add some data. | ||
if (await LinksCollection.find().countAsync() === 0) { | ||
await insertLink({ | ||
title: 'Do the Tutorial', | ||
url: 'https://react-tutorial.meteor.com/simple-todos/01-creating-app.html', | ||
}); | ||
|
||
await insertLink({ | ||
title: 'Follow the Guide', | ||
url: 'https://guide.meteor.com', | ||
}); | ||
|
||
await insertLink({ | ||
title: 'Read the Docs', | ||
url: 'https://docs.meteor.com', | ||
}); | ||
|
||
await insertLink({ | ||
title: 'Discussions', | ||
url: 'https://forums.meteor.com', | ||
}); | ||
} | ||
|
||
// We publish the entire Links collection to all clients. | ||
// In order to be fetched in real-time to the clients | ||
Meteor.publish("links", function () { | ||
return LinksCollection.find(); | ||
}); | ||
Meteor.startup(() => { | ||
initializeTaskCollection(); | ||
registerTaskApi(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,6 @@ [email protected] # Enable TypeScript syntax in .ts and .tsx modules | |
[email protected] # Server-side component of the `meteor shell` command | ||
[email protected] # Update client in development without reloading the page | ||
|
||
|
||
[email protected] # Define static page content in .html files | ||
[email protected]-beta300.1 # React higher-order component for reactively tracking Meteor data | ||
[email protected] # React higher-order component for reactively tracking Meteor data | ||
tasks-common |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,7 @@ [email protected] | |
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,7 @@ | ||
import { Meteor } from 'meteor/meteor'; | ||
import { LinksCollection } from '/imports/api/links'; | ||
import { initializeTaskCollection, registerTaskApi } from 'meteor/tasks-common'; | ||
|
||
async function insertLink({ title, url }) { | ||
await LinksCollection.insertAsync({ title, url, createdAt: new Date() }); | ||
} | ||
|
||
Meteor.startup(async () => { | ||
// If the Links collection is empty, add some data. | ||
if (await LinksCollection.find().countAsync() === 0) { | ||
await insertLink({ | ||
title: 'Do the Tutorial', | ||
url: 'https://react-tutorial.meteor.com/simple-todos/01-creating-app.html', | ||
}); | ||
|
||
await insertLink({ | ||
title: 'Follow the Guide', | ||
url: 'https://guide.meteor.com', | ||
}); | ||
|
||
await insertLink({ | ||
title: 'Read the Docs', | ||
url: 'https://docs.meteor.com', | ||
}); | ||
|
||
await insertLink({ | ||
title: 'Discussions', | ||
url: 'https://forums.meteor.com', | ||
}); | ||
} | ||
|
||
// We publish the entire Links collection to all clients. | ||
// In order to be fetched in real-time to the clients | ||
Meteor.publish("links", function () { | ||
return LinksCollection.find(); | ||
}); | ||
Meteor.startup(() => { | ||
initializeTaskCollection(); | ||
registerTaskApi(); | ||
}); |
Oops, something went wrong.