runcommand

Get StdOut from RunCommand using Azure VM Javascript SDK

别说谁变了你拦得住时间么 提交于 2019-12-13 01:10:59
问题 I'm using the Azure VM Javascript SDK in my Node.js webApp. I'm trying to use the RunCommand Function to run a custom script on my Azure virtual machines. The problem I'm having is with obtaining the response from running the command which should contain the StdOut and StdErr strings. If I run the command from the Azure CLI, Like the following: az vm run-command invoke -g 'myResource' -n 'myVm' --command-id RunPowerShellScript --scripts 'Get-ChildItem -Name' Then I am able to receive the

runCommand vs aggregate method to do aggregation

折月煮酒 提交于 2019-12-11 02:45:42
问题 To run aggregation query it is possible to use either of these: db.collectionName.aggregate(query1); OR db.runCommand(query2) But I noticed something bizarre this morning. While this: db.runCommand( { "aggregate":"collectionName", allowDiskUse: true, "pipeline":[ { "$match":{ "field":param } } ] }); fails with error: { "ok" : 0.0, "errmsg" : "aggregation result exceeds maximum document size (16MB)", "code" : 16389, "codeName" : "Location16389" } This: db.collectionName.aggregate([ { $match: {