这是indexloc提供的服务,不要输入任何密码
Skip to content

[debug] Cache not working under posix linux #197

@Anankke

Description

@Anankke

Describe the bug [描述]

Cache not working under posix linux, WARNING:root:Cache file is out of dated. presents every time.

To Reproduce [复现]

Give run.py several tries and watch the WARNING:root:Cache file is out of dated. presence.

version info [基本信息]

  • DDNS Version: e1ad9a2
  • OS Version: Debian GNU/Linux 10 (buster)
  • Type(运行方式): Python (PyPy 7.3.1)
  • related issues (相关问题):

/tmp/ddns.cache is not properly created.

config file [配置文件]

{
  "$schema": "https://ddns.newfuture.cc/schema/v2.8.json",
  "debug": false,
  "dns": "cloudflare",
  "id": "",
  "index4": "public",
  "index6": "false",
  "ipv4": [
    "ddns.example.com"
  ],
  "ipv6": [
  ],
  "proxy": null,
  "token": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
  "ttl": null,
}

debug output [调试输出]

DDNS[ ${BUILD_SOURCEBRANCHNAME}@${BUILD_DATE} ] run: posix linux
Configuration was loaded from <== /opt/ddns/config.json
========================= Tue Aug  4 18:40:50 2020 =========================
2020-08-04 18:40:50,310 <cache.load> 48@/opt/ddns/util/cache.py 
[DEBUG] load cache data from /tmp/ddns.cache
2020-08-04 18:40:50,311 <cache.load> 62@/opt/ddns/util/cache.py 
[INFO] cache file not exist
2020-08-04 18:40:50,311 <run.main> 189@/opt/ddns/run.py 
[WARNING] Cache file is out of dated.
.
.
.

Additional context

Suggested fix: create /tmp/ddns.cache on successful updates if /tmp/ddns.cache doesn't exits.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions