Skip to content

Commit

Permalink
print output
Browse files Browse the repository at this point in the history
  • Loading branch information
GuyHarwood committed Nov 28, 2017
1 parent 053f445 commit 9bb5e92
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions deploy/jobs/purge-pins.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
'use strict'

try {
print('erasing pupil pins...')
db.pupils.updateMany(
{ pin: {$ne: null} },
{ $set: { pin: null, pinExpiresAt: null } }
)
db.runCommand('getlasterror')
printjson(db.runCommand('getlasterror'))
print('erasing school pins...')
db.schools.updateMany(
{ schoolPin: {$ne: null} },
{ $set: { schoolPin: null, pinExpiresAt: null } }
)
print(db.runCommand('getlasterror'))
printjson(db.runCommand('getlasterror'))

} catch (e) {
print(e)
Expand Down

0 comments on commit 9bb5e92

Please sign in to comment.