django - 如何在 Google Cloud App Engine 上使用 PubSub 创建订阅者,通过 Publisher 从 Google Cloud App Engine Flex 收听消息?

标签 django google-app-engine google-cloud-platform google-cloud-pubsub

我有一个在 Google App Engine 上运行的 Django 应用程序。 Google App Engine Flex 中运行的另一个耗时应用程序是由 Google App Engine 应用程序触发的。

当 Google App Engine Flex 应用程序完成执行时,我希望它触发一条消息并将其发送到 Google App Engine Django 应用程序,以便 Django 可以相应地更新数据库项。

我如何使用 Google Cloud PubSub 来实现这一目标?

最佳答案

1. Create a pubsub topic

2.App Engine Flex 应用程序将 publish messages到您创建的主题

3.Google App Engine Django 应用程序将收到此消息(receiving messages using pull subscriptions receiving messages using push subscriptions

关于django - 如何在 Google Cloud App Engine 上使用 PubSub 创建订阅者,通过 Publisher 从 Google Cloud App Engine Flex 收听消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60624304/

相关文章:

django - 优化 urls.py 的路径约定

python - Django错误: TypeError: int() argument must be a string or a number,而不是 'BuildsTable'

php - Google App Engine PHP 文件上传

firebase - 如何在 Firebase 上进行事件驱动

google-cloud-platform - GCP - 无法打印身份 token

Django + Pydev/Eclipse + Google App Engine - 可能吗?

python - 我可以绕过 python 中的 UnicodeDecodeError 吗?

python - Google 云打印 - Python 代码示例 - GaiaLogin 返回 None

java - Google AppEngine 数据存储 - 远程登录?

google-cloud-storage - gsutil cp 失败 - "Could not create manifest file"