Open blackslate opened 9 years ago
I belive we need to add cache flush on meteor restart.
No players appear in the browser client at port 3000. This is not logical, since the Meteor.neo4j.collection('players') object on the server still considers that there are 7 players to publish.
How do you check Meteor.neo4j.collection('players')
content?
@blackslate saw mention of console.log()
, will came back after testing
@blackslate please update to v0.9.1, all issues should be solved, please update me after testing on your end, thank you for contribution.
Hi, I have the same or similar behaviour with v0.9.1. After meteor restart, the Players.find({}).count() returns 0, despite there are 7 nodes in database, so new 7 players are added. Then console (server side) shows 7, but on client I have 14 players. Each restart adds 7 new players.
I thought that the Neo4j browser running on localhost:7474 and the Meteor-Leaderboard-Neo4j app share the same data in the database. However, I am seeing some evidence that seems to contradict this.
Here are my steps.
I check in the Neo4j browser on port 7474 that all seven have been deleted:
MATCH (p:Player) RETURN p // (no rows)
Players.publish('allPlayers'
:if (Players.find({}).count() <= 0)
statement, after any new players have been created: console.log("players inserted", Players.find().count())When I refresh the web page at localhost:3000, I expect to see...
subscribe callback 0 players inserted 7
... in the Terminal window, and this is indeed what happens, and...
MATCH (p:Player) RETURN p
... returns 7 rows. All well and good.
MATCH (p:Player) RETURN p
returns 0 rows. This is what I expect.subscribe callback 7
. This is unexpected. This is not what the Neo4j browser at port 7474 reports.I stop the Meteor app and restart it, then refresh the browser window for port 3000. The Terminal window now correctly indicates:
subscribe callback 0 players inserted 7
Why does the server object created with Meteor.neo4j.collection('players') still (wrongly) consider that there it contains 7 players, and yet not publish them when the browser subscribes?