[英]Cloud Functions for Firebase deploy interrupted
之前,我花了大約3-4分鍾的時間才能將功能部署到Firebase Cloud。 現在,當我嘗試部署更改時,CMD會運行10-15分鍾,然后給我這個“ Deploy Error: Operation interrupted
並在我的Cloud函數日志中顯示一條消息,提示“ Operation interrupted
。
CMD和Log並不是很有幫助,因為它們無法告訴導致此問題的原因。 我編寫的代碼有問題嗎? 這很簡單,我不認為這是造成問題的原因,但這里是:
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
var roomID = "cheufer_923sfd98";
exports.findRoom = functions.database
.ref('/Players Searching For Room/{uid}')
.onWrite(event => {
if(!event.data.exists())
{
return;
}
admin.database().ref('/Test Array/' + roomID).transaction(function(content){
if(content == null)
{
content.push( {onGoing: false} );
content.push( {players: [] } );
}
content.players.push(event.params.uid);
return content;
}, function(error, committed){
if(committed)
{
console.log("Committed successfully. New data was inserted in table called 'TestArray'");
}
});
});
2017年5月10日下午3:01到5:23 pm(PST)發生了Cloud Functions部署事件。 已解決。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.