我正在尝试将数据存储实体的备份恢复到在本地主机上运行的模拟器中。
我正在使用此位置的指南https://cloud.google.com/datastore/docs/tools/emulator-export-import 这是我迄今为止所做的。
#start the emulator
gcloud beta emulators datastore start --store-on-disk --data-dir "./datastore-emulator" --project=my-project
Run Code Online (Sandbox Code Playgroud)
# set the environment
$(gcloud beta emulators datastore env-init)
# initiate the restore operation
curl -X POST localhost:8081/v1/projects/my-project:import \
-H 'Content-Type: application/json' \
-d '{"input_url":"/home/bogdan/workspace/myCopy/2019-08-19-23-00/2019-08-19-23-00.overall_export_metadata"}'
Run Code Online (Sandbox Code Playgroud)
此时我可以看到模拟器检测到连接,这是日志片段
[datastore] Dev App Server is now running.
[datastore]
[datastore] The previous line was printed for backwards compatibility only.
[datastore] If your tests rely on it to confirm emulator startup,
[datastore] please migrate to the emulator health check endpoint …Run Code Online (Sandbox Code Playgroud) 我很难弄清楚最新版本的博览会如何在一天中的特定时间设置本地通知并使其每天重复。
"expo": "~40.0.0",
"expo-notifications": "~0.8.2",
Run Code Online (Sandbox Code Playgroud)
"expo": "~40.0.0",
"expo-notifications": "~0.8.2",
Run Code Online (Sandbox Code Playgroud)
function startsTomorowButNotAbleToRepeateEvryDay() {
let tomorrow = new Date();
tomorrow.setDate(tomorrow.getDate() + 1);
tomorrow.setHours(20);
tomorrow.setMinutes(0);
return {
content: {
title: "Time to study v2",
body: "Don't forget to study today!",
},
trigger: tomorrow,
};
}
function repeatsEvryDayButNotPossibleToSetTime() {
const seccondsInADay = 24 * 60 * 60;
return {
content: {
title: "Time to study v2",
body: "Don't forget to study today!",
},
trigger: {
seconds: seccondsInADay,
repeats: …Run Code Online (Sandbox Code Playgroud)