{"id":983585,"date":"2024-12-27T07:20:44","date_gmt":"2024-12-26T23:20:44","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/983585.html"},"modified":"2024-12-27T07:20:46","modified_gmt":"2024-12-26T23:20:46","slug":"python%e5%ae%88%e6%8a%a4%e8%bf%9b%e7%a8%8b%e5%a6%82%e4%bd%95%e9%80%80%e5%87%ba","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/983585.html","title":{"rendered":"python\u5b88\u62a4\u8fdb\u7a0b\u5982\u4f55\u9000\u51fa"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24211547\/96ffd148-71c5-42b3-9302-217feae5701f.webp\" alt=\"python\u5b88\u62a4\u8fdb\u7a0b\u5982\u4f55\u9000\u51fa\" \/><\/p>\n<p><p> <strong>Python\u5b88\u62a4\u8fdb\u7a0b\u5982\u4f55\u9000\u51fa\uff1a\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u5b9e\u73b0\uff1a\u6355\u83b7\u4fe1\u53f7\u3001\u8bbe\u7f6e\u6807\u5fd7\u4f4d\u3001\u4f7f\u7528\u8d85\u65f6\u673a\u5236\u3002<\/strong> \u6355\u83b7\u4fe1\u53f7\u662f\u4e00\u4e2a\u5e38\u89c1\u7684\u65b9\u6cd5\uff0c\u5f53\u8fdb\u7a0b\u63a5\u6536\u5230\u6307\u5b9a\u7684\u4fe1\u53f7\u65f6\uff0c\u6267\u884c\u76f8\u5e94\u7684\u5904\u7406\u51fd\u6570\uff0c\u4ece\u800c\u5b9e\u73b0\u5b89\u5168\u9000\u51fa\u3002\u901a\u8fc7\u8bbe\u7f6e\u6807\u5fd7\u4f4d\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5728\u5b88\u62a4\u8fdb\u7a0b\u7684\u4e3b\u5faa\u73af\u4e2d\u68c0\u67e5\u67d0\u4e2a\u53d8\u91cf\u7684\u72b6\u6001\uff0c\u7136\u540e\u6839\u636e\u8be5\u72b6\u6001\u51b3\u5b9a\u662f\u5426\u9000\u51fa\u3002\u4f7f\u7528\u8d85\u65f6\u673a\u5236\u5219\u662f\u5728\u4e00\u5b9a\u65f6\u95f4\u540e\u81ea\u52a8\u9000\u51fa\u6216\u8fdb\u884c\u67d0\u79cd\u64cd\u4f5c\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u51e0\u79cd\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u6355\u83b7\u4fe1\u53f7<\/p>\n<\/p>\n<p><p>\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u4fe1\u53f7\u662f\u4e00\u79cd\u8fdb\u7a0b\u95f4\u901a\u4fe1\u7684\u673a\u5236\u3002Python\u901a\u8fc7<code>signal<\/code>\u6a21\u5757\u53ef\u4ee5\u5f88\u65b9\u4fbf\u5730\u6355\u83b7\u548c\u5904\u7406\u4fe1\u53f7\u3002\u5f53\u5b88\u62a4\u8fdb\u7a0b\u63a5\u6536\u5230\u4e00\u4e2a\u4fe1\u53f7\uff0c\u4f8b\u5982<code>SIGTERM<\/code>\u6216<code>SIGINT<\/code>\uff0c\u53ef\u4ee5\u6267\u884c\u4e00\u4e2a\u5904\u7406\u51fd\u6570\u6765\u8fdb\u884c\u6e05\u7406\u5de5\u4f5c\u5e76\u9000\u51fa\u8fdb\u7a0b\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u8bbe\u7f6e\u4fe1\u53f7\u5904\u7406\u5668<\/strong><\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\u4f7f\u7528<code>signal.signal()<\/code>\u51fd\u6570\u53ef\u4ee5\u4e3a\u7279\u5b9a\u7684\u4fe1\u53f7\u8bbe\u7f6e\u4e00\u4e2a\u5904\u7406\u5668\u51fd\u6570\u3002\u901a\u8fc7\u8fd9\u4e2a\u51fd\u6570\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u63a5\u6536\u5230\u4fe1\u53f7\u65f6\u6267\u884c\u4e00\u4e9b\u81ea\u5b9a\u4e49\u7684\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import signal<\/p>\n<p>import sys<\/p>\n<p>def signal_handler(sig, frame):<\/p>\n<p>    print(&#39;Exiting gracefully...&#39;)<\/p>\n<p>    sys.exit(0)<\/p>\n<p>signal.signal(signal.SIGINT, signal_handler)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5e94\u7528\u5728\u5b88\u62a4\u8fdb\u7a0b<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5b88\u62a4\u8fdb\u7a0b\u7684\u4e3b\u5faa\u73af\u4e2d\uff0c\u53ef\u4ee5\u5229\u7528\u4fe1\u53f7\u5904\u7406\u5668\u6765\u63a7\u5236\u8fdb\u7a0b\u7684\u9000\u51fa\u3002\u5728\u63a5\u6536\u5230\u4fe1\u53f7\u540e\uff0c\u5904\u7406\u5668\u51fd\u6570\u4f1a\u88ab\u8c03\u7528\uff0c\u4ece\u800c\u6267\u884c\u6e05\u7406\u5de5\u4f5c\u5e76\u9000\u51fa\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import time<\/p>\n<p>while True:<\/p>\n<p>    print(&#39;Running...&#39;)<\/p>\n<p>    time.sleep(1)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u8bbe\u7f6e\u6807\u5fd7\u4f4d<\/p>\n<\/p>\n<p><p>\u6807\u5fd7\u4f4d\u662f\u4e00\u79cd\u7b80\u5355\u4f46\u6709\u6548\u7684\u63a7\u5236\u8fdb\u7a0b\u9000\u51fa\u7684\u65b9\u6cd5\u3002\u5728\u5b88\u62a4\u8fdb\u7a0b\u7684\u4e3b\u5faa\u73af\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u8bbe\u7f6e\u4e00\u4e2a\u5168\u5c40\u53d8\u91cf\u4f5c\u4e3a\u6807\u5fd7\u4f4d\uff0c\u5f53\u9700\u8981\u9000\u51fa\u8fdb\u7a0b\u65f6\uff0c\u6539\u53d8\u8fd9\u4e2a\u53d8\u91cf\u7684\u503c\u3002\u4e3b\u5faa\u73af\u4f1a\u4e0d\u65ad\u68c0\u67e5\u8fd9\u4e2a\u53d8\u91cf\u7684\u72b6\u6001\uff0c\u6839\u636e\u5176\u72b6\u6001\u51b3\u5b9a\u662f\u5426\u9000\u51fa\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b9a\u4e49\u6807\u5fd7\u4f4d<\/strong><\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u5b9a\u4e49\u4e00\u4e2a\u5168\u5c40\u53d8\u91cf\u4f5c\u4e3a\u6807\u5fd7\u4f4d\u3002\u521d\u59cb\u72b6\u6001\u4e3a<code>True<\/code>\uff0c\u8868\u793a\u8fdb\u7a0b\u6b63\u5e38\u8fd0\u884c\u3002\u5f53\u9700\u8981\u9000\u51fa\u65f6\uff0c\u5c06\u5176\u8bbe\u4e3a<code>False<\/code>\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">running = True<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u66f4\u65b0\u6807\u5fd7\u4f4d\u5e76\u68c0\u6d4b<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5b88\u62a4\u8fdb\u7a0b\u7684\u67d0\u4e2a\u5730\u65b9\uff08\u4f8b\u5982\u4fe1\u53f7\u5904\u7406\u5668\u6216\u5176\u4ed6\u4e8b\u4ef6\u89e6\u53d1\u5668\uff09\uff0c\u53ef\u4ee5\u66f4\u65b0\u6807\u5fd7\u4f4d\u7684\u72b6\u6001\u3002\u7136\u540e\u5728\u4e3b\u5faa\u73af\u4e2d\u68c0\u6d4b\u8fd9\u4e2a\u72b6\u6001\uff0c\u51b3\u5b9a\u662f\u5426\u9000\u51fa\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import time<\/p>\n<p>def stop_running():<\/p>\n<p>    global running<\/p>\n<p>    running = False<\/p>\n<p>while running:<\/p>\n<p>    print(&#39;Running...&#39;)<\/p>\n<p>    time.sleep(1)<\/p>\n<p>print(&#39;Exited gracefully.&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u4f7f\u7528\u8d85\u65f6\u673a\u5236<\/p>\n<\/p>\n<p><p>\u8d85\u65f6\u673a\u5236\u662f\u4e00\u79cd\u81ea\u52a8\u63a7\u5236\u8fdb\u7a0b\u9000\u51fa\u7684\u65b9\u6cd5\u3002\u53ef\u4ee5\u5728\u5b88\u62a4\u8fdb\u7a0b\u4e2d\u8bbe\u7f6e\u4e00\u4e2a\u8d85\u65f6\uff0c\u5f53\u8fd0\u884c\u65f6\u95f4\u8d85\u8fc7\u8fd9\u4e2a\u8d85\u65f6\u65f6\u95f4\u65f6\uff0c\u8fdb\u7a0b\u81ea\u52a8\u9000\u51fa\u3002\u8fd9\u79cd\u65b9\u5f0f\u9002\u7528\u4e8e\u9700\u8981\u5728\u7279\u5b9a\u65f6\u95f4\u540e\u505c\u6b62\u8fd0\u884c\u7684\u5b88\u62a4\u8fdb\u7a0b\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u8bbe\u7f6e\u8d85\u65f6\u65f6\u95f4<\/strong><\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u5b9a\u4e49\u4e00\u4e2a\u65f6\u95f4\u70b9\u4f5c\u4e3a\u8d85\u65f6\u7684\u622a\u6b62\u65f6\u95f4\u3002\u53ef\u4ee5\u4f7f\u7528<code>time.time()<\/code>\u51fd\u6570\u6765\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\u6233\uff0c\u7136\u540e\u52a0\u4e0a\u4e00\u4e2a\u65f6\u95f4\u95f4\u9694\u4f5c\u4e3a\u8d85\u65f6\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import time<\/p>\n<p>timeout = time.time() + 60  # \u8d85\u65f61\u5206\u949f<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u68c0\u6d4b\u8d85\u65f6<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5b88\u62a4\u8fdb\u7a0b\u7684\u4e3b\u5faa\u73af\u4e2d\uff0c\u68c0\u6d4b\u5f53\u524d\u65f6\u95f4\u4e0e\u8d85\u65f6\u65f6\u95f4\u7684\u5dee\u503c\u3002\u5982\u679c\u5f53\u524d\u65f6\u95f4\u8d85\u8fc7\u4e86\u8d85\u65f6\u65f6\u95f4\uff0c\u5c31\u9000\u51fa\u5faa\u73af\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">while True:<\/p>\n<p>    if time.time() &gt; timeout:<\/p>\n<p>        print(&#39;Timeout reached, exiting...&#39;)<\/p>\n<p>        break<\/p>\n<p>    print(&#39;Running...&#39;)<\/p>\n<p>    time.sleep(1)<\/p>\n<p>print(&#39;Exited due to timeout.&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u7ed3\u5408\u591a\u79cd\u65b9\u6cd5<\/p>\n<\/p>\n<p><p>\u6709\u65f6\u5019\uff0c\u4ec5\u4ec5\u4f7f\u7528\u4e00\u79cd\u9000\u51fa\u673a\u5236\u53ef\u80fd\u4e0d\u591f\u7075\u6d3b\u3002\u6211\u4eec\u53ef\u4ee5\u7ed3\u5408\u591a\u79cd\u65b9\u6cd5\u6765\u5b9e\u73b0\u66f4\u52a0\u5b89\u5168\u548c\u53ef\u9760\u7684\u9000\u51fa\u673a\u5236\u3002\u4f8b\u5982\uff0c\u7ed3\u5408\u4fe1\u53f7\u6355\u83b7\u548c\u6807\u5fd7\u4f4d\uff0c\u5728\u63a5\u6536\u5230\u4fe1\u53f7\u65f6\u8bbe\u7f6e\u6807\u5fd7\u4f4d\uff0c\u6216\u8005\u5728\u8d85\u65f6\u65f6\u95f4\u5185\u68c0\u6d4b\u6807\u5fd7\u4f4d\u7684\u72b6\u6001\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u7ed3\u5408\u4fe1\u53f7\u548c\u6807\u5fd7\u4f4d<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u4fe1\u53f7\u5904\u7406\u5668\u4e2d\u8bbe\u7f6e\u6807\u5fd7\u4f4d\uff0c\u7136\u540e\u5728\u4e3b\u5faa\u73af\u4e2d\u540c\u65f6\u68c0\u6d4b\u6807\u5fd7\u4f4d\u548c\u8d85\u65f6\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import signal<\/p>\n<p>import sys<\/p>\n<p>import time<\/p>\n<p>running = True<\/p>\n<p>def signal_handler(sig, frame):<\/p>\n<p>    global running<\/p>\n<p>    print(&#39;Signal received, setting running to False...&#39;)<\/p>\n<p>    running = False<\/p>\n<p>signal.signal(signal.SIGINT, signal_handler)<\/p>\n<p>timeout = time.time() + 60  # \u8d85\u65f61\u5206\u949f<\/p>\n<p>while running and time.time() &lt;= timeout:<\/p>\n<p>    print(&#39;Running...&#39;)<\/p>\n<p>    time.sleep(1)<\/p>\n<p>print(&#39;Exited gracefully.&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7ed3\u5408\u8d85\u65f6\u548c\u5916\u90e8\u89e6\u53d1<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u7279\u5b9a\u7684\u8d85\u65f6\u65f6\u95f4\u5185\uff0c\u53ef\u4ee5\u901a\u8fc7\u5916\u90e8\u4e8b\u4ef6\uff08\u4f8b\u5982\u6587\u4ef6\u76d1\u63a7\u3001\u7f51\u7edc\u8bf7\u6c42\u7b49\uff09\u6765\u6539\u53d8\u8fdb\u7a0b\u7684\u8fd0\u884c\u72b6\u6001\uff0c\u4ece\u800c\u5b9e\u73b0\u7075\u6d3b\u7684\u9000\u51fa\u63a7\u5236\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>timeout = time.time() + 60  # \u8d85\u65f61\u5206\u949f<\/p>\n<p>running = True<\/p>\n<p>def check_external_event():<\/p>\n<p>    # \u68c0\u67e5\u67d0\u4e2a\u5916\u90e8\u6761\u4ef6\u662f\u5426\u6ee1\u8db3\uff0c\u4f8b\u5982\u6587\u4ef6\u5b58\u5728<\/p>\n<p>    return os.path.exists(&#39;stop.txt&#39;)<\/p>\n<p>while running and time.time() &lt;= timeout:<\/p>\n<p>    if check_external_event():<\/p>\n<p>        print(&#39;External event triggered, exiting...&#39;)<\/p>\n<p>        break<\/p>\n<p>    print(&#39;Running...&#39;)<\/p>\n<p>    time.sleep(1)<\/p>\n<p>print(&#39;Exited due to external event or timeout.&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u51e0\u79cd\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u6709\u6548\u5730\u63a7\u5236Python\u5b88\u62a4\u8fdb\u7a0b\u7684\u9000\u51fa\u65b9\u5f0f\u3002\u8fd9\u4e9b\u65b9\u6cd5\u5404\u6709\u4f18\u7f3a\u70b9\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u7684\u5e94\u7528\u573a\u666f\u9009\u62e9\u5408\u9002\u7684\u5b9e\u73b0\u65b9\u5f0f\u3002\u7ed3\u5408\u591a\u79cd\u65b9\u6cd5\u53ef\u4ee5\u63d0\u9ad8\u7a0b\u5e8f\u7684\u9c81\u68d2\u6027\uff0c\u786e\u4fdd\u5b88\u62a4\u8fdb\u7a0b\u80fd\u591f\u5728\u9700\u8981\u65f6\u5b89\u5168\u3001\u53ef\u9760\u5730\u9000\u51fa\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f18\u96c5\u5730\u505c\u6b62\u4e00\u4e2aPython\u5b88\u62a4\u8fdb\u7a0b\uff1f<\/strong><br \/>\u8981\u4f18\u96c5\u5730\u505c\u6b62\u4e00\u4e2aPython\u5b88\u62a4\u8fdb\u7a0b\uff0c\u901a\u5e38\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u4e00\u4e2a\u6807\u5fd7\u4f4d\u6216\u4f7f\u7528\u4fe1\u53f7\u6765\u901a\u77e5\u5b88\u62a4\u8fdb\u7a0b\u9000\u51fa\u3002\u5b88\u62a4\u8fdb\u7a0b\u5e94\u5b9a\u671f\u68c0\u67e5\u8fd9\u4e2a\u6807\u5fd7\u4f4d\uff0c\u5e76\u5728\u63a5\u6536\u5230\u9000\u51fa\u4fe1\u53f7\uff08\u5982SIGTERM\uff09\u65f6\u8fdb\u884c\u6e05\u7406\u5de5\u4f5c\u540e\u5b89\u5168\u9000\u51fa\u3002\u786e\u4fdd\u5728\u9000\u51fa\u65f6\u91ca\u653e\u6240\u6709\u8d44\u6e90\uff0c\u4ee5\u9632\u6b62\u6f5c\u5728\u7684\u8d44\u6e90\u6cc4\u6f0f\u3002<\/p>\n<p><strong>Python\u5b88\u62a4\u8fdb\u7a0b\u5982\u4f55\u5904\u7406\u5f02\u5e38\uff1f<\/strong><br \/>\u5728\u5b88\u62a4\u8fdb\u7a0b\u4e2d\u5904\u7406\u5f02\u5e38\u81f3\u5173\u91cd\u8981\uff0c\u56e0\u4e3a\u672a\u5904\u7406\u7684\u5f02\u5e38\u4f1a\u5bfc\u81f4\u8fdb\u7a0b\u5d29\u6e83\u3002\u53ef\u4ee5\u4f7f\u7528try-except\u5757\u6765\u6355\u83b7\u5f02\u5e38\uff0c\u5e76\u5728except\u5757\u4e2d\u8bb0\u5f55\u9519\u8bef\u4fe1\u606f\u6216\u91c7\u53d6\u9002\u5f53\u7684\u6062\u590d\u63aa\u65bd\u3002\u6b64\u5916\uff0c\u8003\u8651\u4f7f\u7528\u65e5\u5fd7\u8bb0\u5f55\u529f\u80fd\uff0c\u5c06\u5f02\u5e38\u4fe1\u606f\u8bb0\u5f55\u5230\u65e5\u5fd7\u6587\u4ef6\u4e2d\uff0c\u4ee5\u4fbf\u540e\u7eed\u5206\u6790\u548c\u8c03\u8bd5\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u521b\u5efa\u548c\u7ba1\u7406\u5b88\u62a4\u8fdb\u7a0b\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>multiprocessing<\/code>\u6a21\u5757\u521b\u5efa\u5b88\u62a4\u8fdb\u7a0b\u3002\u901a\u8fc7\u8bbe\u7f6e<code>daemon<\/code>\u5c5e\u6027\u4e3a<code>True<\/code>\uff0c\u4f7f\u5b50\u8fdb\u7a0b\u6210\u4e3a\u5b88\u62a4\u8fdb\u7a0b\u3002\u7ba1\u7406\u5b88\u62a4\u8fdb\u7a0b\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>join()<\/code>\u65b9\u6cd5\u6765\u7b49\u5f85\u5176\u5b8c\u6210\uff0c\u6216\u8005\u4f7f\u7528<code>terminate()<\/code>\u65b9\u6cd5\u5f3a\u5236\u7ed3\u675f\u8fdb\u7a0b\u3002\u786e\u4fdd\u5728\u521b\u5efa\u5b88\u62a4\u8fdb\u7a0b\u65f6\u8003\u8651\u5230\u5176\u751f\u547d\u5468\u671f\u7ba1\u7406\uff0c\u4ee5\u907f\u514d\u51fa\u73b0\u50f5\u5c38\u8fdb\u7a0b\u6216\u8d44\u6e90\u5360\u7528\u95ee\u9898\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u5b88\u62a4\u8fdb\u7a0b\u5982\u4f55\u9000\u51fa\uff1a\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u5b9e\u73b0\uff1a\u6355\u83b7\u4fe1\u53f7\u3001\u8bbe\u7f6e\u6807\u5fd7\u4f4d\u3001\u4f7f\u7528\u8d85\u65f6\u673a\u5236\u3002 \u6355\u83b7\u4fe1\u53f7\u662f\u4e00\u4e2a\u5e38\u89c1\u7684 [&hellip;]","protected":false},"author":3,"featured_media":983593,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/983585"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=983585"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/983585\/revisions"}],"predecessor-version":[{"id":983598,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/983585\/revisions\/983598"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/983593"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=983585"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=983585"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=983585"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}