admin管理员组文章数量:1405121
I have a firebase function that attempts to enqueue a task with some data. Every time I call it I get the following two errors from the cloud run logs:
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url:
firebase_admin.exceptions.InvalidArgumentError: Request contains an invalid argument.
Here is my code:
@scheduler_fn.on_schedule(schedule="every day 00:00", timeout_sec=540, secrets=[APIFY_API_KEY])
def update_brooklyn_listings(event: scheduler_fn.ScheduledEvent) -> None:
asyncio.run(update_brooklyn_listings_async())
async def update_brooklyn_listings_async():
result = await SOME_ASYNC_TASK
data = json.loads(result.get_bytes(format="json"))
body = {"data": data}
task_queue = functions.task_queue("functionname")
task_queue.enqueue(body)
Based on the enqueue
documentation no options parameter is needed, and the data
passed in can be of type Any
. Any idea what I could be missing here?
版权声明:本文标题:python - Incorrect argument error when trying to enqueue a task within a firebase function - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744262874a2597802.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论