auto scrolling working!

This commit is contained in:
Luke Berndt
2021-02-11 21:54:38 -05:00
parent 6f7b86f0cb
commit 25b953d58d
18 changed files with 86 additions and 193 deletions

View File

@@ -17,7 +17,6 @@ MAINTAINER Luke Berndt <lukekb@gmail.com>
# Add main NGINX config
RUN mkdir -p /app
ADD trim.js /app
ADD totals.js /app
ADD init_test_db.js /app
ADD upgrade_db_admin.js /app

View File

@@ -1,25 +0,0 @@
db = db.getMongo().getDB( "scanner" );
var bulkRemove = db.calls.initializeUnorderedBulkOp()
var short_date = new Date();
db.systems.find().forEach(
function(system){
var date = new Date();
var total =0;
if (system.planType == 10){
date.setMonth(date.getDate() - 30);
} else {
date.setDate(date.getDate() - 7);
}
print(system.shortName);
bulkRemove.find({"time":{$lt: date}, "shortName": system.shortName}).remove();
});
//bulkInsert.execute()
var results = bulkRemove.execute();
print("Removed: " + results.nRemoved);