【问题标题】:Google Cloud: Where to add a task to the Cloud Tasks queue?Google Cloud:在哪里将任务添加到 Cloud Tasks 队列?
【发布时间】:2021-05-05 04:11:44
【问题描述】:

我被困在这里: https://cloud.google.com/tasks/docs/quickstart?hl=ca-ES#add_a_task_to_the_cloud_tasks_queue

在哪里放置和导出环境变量(PROJECT_ID、LOCATION_ID 和 QUEUE_ID),因为文档说我应该将它们放在示例应用程序的代码中,但我不知道具体在哪个文件中。我正在使用 NodeJS

export PROJECT_ID=PROJECT_ID // The project ID from above
export LOCATION_ID=LOCATION_ID // The region in which your queue is running
export QUEUE_ID=my-queue // The queue you created above

【问题讨论】:

标签: javascript node.js google-cloud-platform google-cloud-tasks


【解决方案1】:

您只需要根据您的操作系统设置environment variables

如果在基于 UNIX 的系统(Linux、MacOS)中使用,export 命令应在终端中运行。

如果您使用的是 Windows,则需要多点击几下。

以下blog post 介绍了所有主要操作系统的所有详细信息。

【讨论】:

    猜你喜欢
    • 2019-03-25
    • 2020-03-11
    • 2020-08-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-21
    • 1970-01-01
    • 2011-01-08
    相关资源
    最近更新 更多