使用“如何在 microsoft azure 上的 django 项目中配置 celery-redis? ”的精彩答案,我可以使用以下 Python 代码将 Celery 配置为使用非 ssl 端口 6379使用 Azure Redis 缓存:
from celery import Celery
# This one works
url = 'redis://:<access key>@<my server>.redis.cache.windows.net:6379/0'
# I want to use a url that specifies ssl like one of the following:
# url = 'redis://:<my key>=@<my server>.redis.cache.windows.net:6380/0'
# url = 'redis://:<my key>@<my server>.redis.cache.windows.net:6380/0?ssl=True'
app = Celery('tasks', broker=url)
@app.task
def add(x, y):
return x + y
Run Code Online (Sandbox Code Playgroud)
但是,我想让 celery 使用 ssl 并使用 ssl 在端口 3380 …
当我使用Azure资源管理器使用非托管磁盘创建VM时,我可以在名为"vhds"的子容器中的指定存储帐户的Blob容器下的Microsft Azure Storage Explorer和/或Azure门户中查看其.vhd .
当我使用带有托管磁盘的Azure资源管理器创建VM时,我找不到任何与此托管磁盘相关的存储容器.
据我所知,根据这个Microsoft文档,Azure正在为我"管理"这个存储,而且我可以为这个磁盘生成一个"SAS Url"(它没有给我关于blob存储位置的真实信息),但我相信(让我知道,如果我错了),Azure必须将我的"托管磁盘"存储在我的订阅中的存储帐户中,并且我应该能够在Microsoft Azure存储中的某处看到这些"托管磁盘"的blob资源管理器或Azure门户.
有没有一种简单的方法可以在门户网站或Microsoft Azure存储资源管理器中查看这些托管磁盘.vhds?
azure azure-virtual-machine azure-resource-manager azureportal azure-managed-disk
我正在使用 Fiddler 的“FiddlerScript”来修改来自 Web 服务器的响应,以便我可以在我的应用程序中测试响应。
这是我的 OnBeforeResponse 函数:
static function OnBeforeResponse(oSession: Session) {
// This code was already here, leaving it
if (m_Hide304s && oSession.responseCode == 304) {
oSession["ui-hide"] = "true";
}
// Here is new code to modify server's response
if(oSession.HostnameIs("mydomain.com") && oSession.uriContains("config")) {
// Color this response, so we can spot it in Fiddler
oSession["ui-backcolor"] = "lime";
// Convert the request body into a string
var oBody = System.Text.Encoding.UTF8.GetString(oSession.responseBodyBytes);
var j: Fiddler.WebFormats.JSON.JSONParseResult;
// Convert the text into a …Run Code Online (Sandbox Code Playgroud) 当我在Azure门户中创建新的CosmosDB数据库时,我必须在各种API(Gremlin,MongoDB,SQL/DocumentDB和Table)之间进行选择.
与Azure门户的许多其他限制一样,我希望有一种方法可以使用PowerShell或Azuzre cli配置新的CosmosDB以使用多个API.
有没有办法在我的CosmosDB实例中添加其他API?如果没有,将来有没有办法做到这一点?
更新: 我刚刚使用Mongo api创建了一个Cosmos DB帐户,并注意到Query Explorer仍然可用,并且允许我输入并执行SQL/DocumentDB查询,因此显然默认是允许两个API(Mongo和SQL)/DocumentDB).但是,我不确定如何获取ConnectionString(AccountKey),以便我可以像azure门户在我自己的客户端中那样使用DocumentDB/SQL API.任何人都有关于如何使用Mongo API从CosmosDB设置连接字符串的想法,以便它是DocumentDB/Sql API的有效连接字符串?
azure ×2
python ×2
azure-cli ×1
azureportal ×1
celery ×1
fiddler ×1
jscript.net ×1
json ×1
python-2.7 ×1
redis ×1