This commit is contained in:
xyj 2024-03-02 10:38:32 +08:00
parent 8b695dde90
commit 61ca87d173
2 changed files with 40 additions and 16 deletions

View File

@ -5,9 +5,8 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="6fcbdb26-1795-4695-b353-57b405f1e401" name="Changes" comment="update"> <list default="true" id="6fcbdb26-1795-4695-b353-57b405f1e401" name="Changes" comment="update">
<change afterPath="$PROJECT_DIR$/forever.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/conf/common/push_stream.conf" beforeDir="false" afterPath="$PROJECT_DIR$/conf/common/push_stream.conf" afterDir="false" /> <change beforePath="$PROJECT_DIR$/forever.py" beforeDir="false" afterPath="$PROJECT_DIR$/forever.py" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -39,15 +38,16 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent">{ <component name="PropertiesComponent"><![CDATA[{
&quot;keyToString&quot;: { "keyToString": {
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;, "Python.forever.executor": "Run",
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;, "RunOnceActivity.OpenProjectViewOnStart": "true",
&quot;git-widget-placeholder&quot;: &quot;master&quot;, "RunOnceActivity.ShowReadmeOnStart": "true",
&quot;last_opened_file_path&quot;: &quot;C:/Users/lihai/PycharmProjects/lot_manager&quot;, "git-widget-placeholder": "master",
&quot;settings.editor.selected.configurable&quot;: &quot;com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable&quot; "last_opened_file_path": "C:/Users/lihai/PycharmProjects/lot_manager",
"settings.editor.selected.configurable": "com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable"
} }
}</component> }]]></component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/conf" /> <recent name="$PROJECT_DIR$/conf" />
@ -64,8 +64,8 @@
<recent name="$PROJECT_DIR$/conf" /> <recent name="$PROJECT_DIR$/conf" />
</key> </key>
</component> </component>
<component name="RunManager" selected="Shell Script.git_push.sh (1)"> <component name="RunManager" selected="Python.forever">
<configuration name="t" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true"> <configuration name="forever" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="agri_xumu" /> <module name="agri_xumu" />
<option name="ENV_FILES" value="" /> <option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" /> <option name="INTERPRETER_OPTIONS" value="" />
@ -75,10 +75,10 @@
</envs> </envs>
<option name="SDK_HOME" value="" /> <option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" /> <option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" /> <option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" /> <option name="ADD_SOURCE_ROOTS" value="true" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/t.py" /> <option name="SCRIPT_NAME" value="$PROJECT_DIR$/forever.py" />
<option name="PARAMETERS" value="" /> <option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" /> <option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" /> <option name="EMULATE_TERMINAL" value="false" />
@ -163,11 +163,11 @@
</configuration> </configuration>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="Python.forever" />
<item itemvalue="Shell Script.git_push.sh (1)" /> <item itemvalue="Shell Script.git_push.sh (1)" />
<item itemvalue="Shell Script.git_push.sh" /> <item itemvalue="Shell Script.git_push.sh" />
<item itemvalue="Python.test" /> <item itemvalue="Python.test" />
<item itemvalue="Python.video_task" /> <item itemvalue="Python.video_task" />
<item itemvalue="Python.t" />
</list> </list>
</recent_temporary> </recent_temporary>
</component> </component>
@ -243,7 +243,15 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1709001137522</updated> <updated>1709001137522</updated>
</task> </task>
<option name="localTasksCounter" value="8" /> <task id="LOCAL-00008" summary="update">
<option name="closed" value="true" />
<created>1709346294546</created>
<option name="number" value="00008" />
<option name="presentableId" value="LOCAL-00008" />
<option name="project" value="LOCAL" />
<updated>1709346294546</updated>
</task>
<option name="localTasksCounter" value="9" />
<servers /> <servers />
</component> </component>
<component name="UnknownFeatures"> <component name="UnknownFeatures">

View File

@ -0,0 +1,16 @@
import schedule
import time
import subprocess
def job():
subprocess.Popen(cmd=['supervisorctl reload'], shell=True)
print("任务执行了!当前时间:", time.strftime('%Y-%m-%d %H:%M:%S', time.localtime()))
# 每半小时执行一次
schedule.every(1).minutes.do(job)
while True:
schedule.run_pending()
time.sleep(1)