I'm developing a function in the cloud, but sometimes it works and other times it does not work. When it does not work it throws the following error: LeanCloudError: [1] No such cloud function 'myFunction'
But when does not work, I execute the command (lean deploy) even without make any changes and if I try again, the function works.
I do not know what to do, I'm waiting for your help.
I am using the python SDK

我正在云中开发一个功能,但有时它可以工作,有时它不起作用。 当它不起作用时,它会抛出以下错误:LeanCloudError: [1] No such cloud function 'myFunction'
但是当不起作用时,我执行命令(lean deploy),即使没有做任何更改,如果我再试一次,该功能也可以。
我不知道该怎么办,我在等你的帮忙。
我正在使用python SDK

Can you reproduce this problem at local development environment?

(You can run lean up and debug cloud functions at http://localhost:30011)

If it is not reproducible at local development environment, and you are using a trial instance, this may be caused by sleeping:

A trial instances will start sleeping if no request is made in the past 30 minutes.
A sleeping instance will resume when a request comes in.
It may take 2 to 10 seconds for the instance to get back running and have the
request processed. The requests made after that will be responded
immediately.

BTW, this is a preview of English documentation:

https://deploy-preview-47--lc-docs-en.netlify.com/leanengine_overview.html3

(This is just a preview. English documentation is not launched officially. So it may contain some errors.)

1 人赞了这个帖子.