streamer-auto-demote.js mongo script
This commit is contained in:
parent
c8facfd9e1
commit
5bb2d3379b
11
bin/mongodb/streamer-auto-demote.js
Normal file
11
bin/mongodb/streamer-auto-demote.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
db.streamer.update({
|
||||
liveAt:{$exists:0},
|
||||
createdAt:{$lt:new Date(Date.now() - 1000 * 3600 * 24 * 7)}
|
||||
},{
|
||||
$set:{
|
||||
'approval.granted':false,
|
||||
demoted:true
|
||||
}
|
||||
},{
|
||||
multi:1
|
||||
})
|
Loading…
Reference in a new issue