fixed cli conditions
This commit is contained in:
@@ -70,12 +70,12 @@ async function init(type) {
|
||||
var filter = {
|
||||
"isDestroyed":false,
|
||||
"isDeleted": false,
|
||||
"$or": [ {"runForever":{ "$exists": false }}, {"runForever": false}],
|
||||
"$and": [{ "$or": [ {"runForever":{ "$exists": false }}, {"runForever": false}]}],
|
||||
"statusVms": "Stopped",
|
||||
"$or": [
|
||||
"$and": [{"$or": [
|
||||
{ "options": {"$exists": true}, "options.vm1": { "$exists": true } },
|
||||
{ "vmImage": {"$exists": true}, "vmImage.vm1": { "$exists": true } },
|
||||
]
|
||||
]}]
|
||||
};
|
||||
if ( type === "warning" ) {
|
||||
filter.pendingNextAction = {$ne: "destroy"};
|
||||
|
||||
@@ -61,13 +61,14 @@ async function init(type) {
|
||||
var filter = {
|
||||
"isDestroyed": false,
|
||||
"isDeleted": false,
|
||||
"$or": [ {"runForever":{ "$exists": false }}, {"runForever": false}],
|
||||
"$and": [{ "$or": [ {"runForever":{ "$exists": false }}, {"runForever": false}]}],
|
||||
"statusVms": "Running",
|
||||
"$or": [
|
||||
"$and": [{"$or": [
|
||||
{ "options": {"$exists": true}, "options.vm1": { "$exists": true } },
|
||||
{ "vmImage": {"$exists": true}, "vmImage.vm1": { "$exists": true } },
|
||||
]
|
||||
]}]
|
||||
};
|
||||
|
||||
if ( type === "warning" ) {
|
||||
filter.pendingNextAction = { $ne: "stopVms" };
|
||||
cb = doSendEmailWarning;
|
||||
|
||||
Reference in New Issue
Block a user