【问题标题】:Firebase, Cloud Function -- Error: 9 FAILED_PRECONDITION: The 'read_time' cannot be more than 270 seconds in the pastFirebase,云功能 - 错误:9 FAILED_PRECONDITION:“read_time”不能超过 270 秒过去
【发布时间】:2021-08-02 04:59:05
【问题描述】:

我的收藏有大约。 20.000 个文档,当我尝试通过以下代码更新每个文档时;我收到此错误:Error: 9 FAILED_PRECONDITION: The 'read_time' cannot be more than 270 seconds in the past. The requested value was '2021-05-11T19:09:49.064209Z', but the minimum allowed value was '2021-05-11T19:10:23.865748Z'. 我尝试通过使用批处理来解决此问题,但没有成功。有什么推荐吗?

 exports.scheduledFunctionFilms = functions.runWith(runtimeOpts).region('europe-west3').pubsub.schedule('0 05 * * 0').timeZone('Europe/Istanbul').onRun((context) => {

db.collection('Films').get().then(querySnapshot => {


    if (querySnapshot.empty) {
        console.log("null film")
        return null;
    } else {
        const promises = []
        console.log("started film")
        querySnapshot.forEach(doc => {
            promises.push(doc.ref.update({sectionPoint:0}));
        });
        console.log("finished film")
        return Promise.all(promises);
    }
}).catch(error => {

    console.log('uncaught error film: ', error);

});

【问题讨论】:

标签: firebase google-cloud-functions


【解决方案1】:

我猜,5 月 11 日的 Google Cloud Firestore 存在问题 (https://status.cloud.google.com/incidents/VVJnin9xh36NeBQ7Ut3c)。我在 5 月 20 日得到了同样的结果。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-02-12
    • 2018-05-17
    • 2018-11-17
    • 2021-12-01
    • 2018-05-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多