小编Bog*_*riu的帖子

无法将实体导入数据存储模拟器

我正在尝试将数据存储实体的备份恢复到在本地主机上运行的模拟器中。

我正在使用此位置的指南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)

emulation google-cloud-datastore google-cloud-platform

5
推荐指数
0
解决办法
804
查看次数

世博本地通知如何设置每天开始和重复的时间?

我很难弄清楚最新版本的博览会如何在一天中的特定时间设置本地通知并使其每天重复。

  • package.json 中的相关部分
"expo": "~40.0.0",
"expo-notifications": "~0.8.2",
Run Code Online (Sandbox Code Playgroud)
  • 我可以使用此 sipets 创建通知
"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)

notifications local react-native expo

2
推荐指数
1
解决办法
3663
查看次数