Commit b299d6ae authored by Reza Sahebgharan's avatar Reza Sahebgharan

fix(update publish): upate publish for translit

parent 43627a08
Pipeline #1067 passed with stage
in 39 minutes and 3 seconds
...@@ -238,7 +238,7 @@ export default { ...@@ -238,7 +238,7 @@ export default {
}, },
transliterationdb() { transliterationdb() {
return TransliterationDb.find({}, { limit: this.limit }); return TransliterationDb.find({}, { limit: this.limit, sort: { ID: 1 } });
} }
} }
}; };
......
...@@ -24,7 +24,7 @@ Meteor.methods({ ...@@ -24,7 +24,7 @@ Meteor.methods({
counter++; counter++;
// Send to server in batch of 1000 insert operations // Send to server in batch of 1000 insert operations
if (counter % 10000 == 0) { if (counter % 1000 == 0) {
// Execute per 1000 operations and re-initialize every 1000 update statements // Execute per 1000 operations and re-initialize every 1000 update statements
bulkOp.execute(function(e, rresult) { bulkOp.execute(function(e, rresult) {
// do something with result // do something with result
...@@ -33,7 +33,7 @@ Meteor.methods({ ...@@ -33,7 +33,7 @@ Meteor.methods({
} }
} }
// Clean up queues // Clean up queues
if (counter % 10000 != 0) { if (counter % 1000 != 0) {
bulkOp.execute(function(e, result) { bulkOp.execute(function(e, result) {
// do something with result // do something with result
}); });
......
...@@ -11,8 +11,7 @@ Meteor.publish("transliterationdb", function({ limit }) { ...@@ -11,8 +11,7 @@ Meteor.publish("transliterationdb", function({ limit }) {
check(limit, Number); check(limit, Number);
return TransliterationDb.find({}, { return TransliterationDb.find({}, {
disableOplog: true, sort: { ID: 1 },
pollingIntervalMs: 1000,
limit: limit limit: limit
}); });
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment