Kaynağa Gözat

完善自动处理流程

yuliang1112 2 yıl önce
ebeveyn
işleme
02445c56b9
5 değiştirilmiş dosya ile 39 ekleme ve 3 silme
  1. 15 0
      .idea/deployment.xml
  2. 8 0
      .idea/sshConfigs.xml
  3. 14 0
      .idea/webServers.xml
  4. 0 1
      dockerfile
  5. 2 2
      service/auto_task.go

+ 15 - 0
.idea/deployment.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="PublishConfigData" autoUpload="On explicit save action" serverName="yangji" remoteFilesAllowedToDisappearOnAutoupload="false" autoUploadExternalChanges="true">
+    <serverData>
+      <paths name="yangji">
+        <serverdata>
+          <mappings>
+            <mapping deploy="/root/app" local="$PROJECT_DIR$" web="/" />
+          </mappings>
+        </serverdata>
+      </paths>
+    </serverData>
+    <option name="myAutoUpload" value="ON_EXPLICIT_SAVE" />
+  </component>
+</project>

+ 8 - 0
.idea/sshConfigs.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="SshConfigs">
+    <configs>
+      <sshConfig authType="PASSWORD" host="139.9.53.143" id="c2c9746d-0068-4d02-a757-d76c286d3e6e" port="22" nameFormat="DESCRIPTIVE" username="root" />
+    </configs>
+  </component>
+</project>

+ 14 - 0
.idea/webServers.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="WebServers">
+    <option name="servers">
+      <webServer id="3d15d1e3-de40-40ce-92c5-95172fc67d45" name="yangji">
+        <fileTransfer rootFolder="/root" accessType="SFTP" host="139.9.53.143" port="22" sshConfigId="c2c9746d-0068-4d02-a757-d76c286d3e6e" sshConfig="root@139.9.53.143:22 password">
+          <advancedOptions>
+            <advancedOptions dataProtectionLevel="Private" keepAliveTimeout="0" passiveMode="true" shareSSLContext="true" />
+          </advancedOptions>
+        </fileTransfer>
+      </webServer>
+    </option>
+  </component>
+</project>

+ 0 - 1
dockerfile

@@ -4,7 +4,6 @@ WORKDIR /go/src/app
 
 COPY . .
 
-#ÉèÖÃʱÇø
 RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
 
 ENV youngee_env pro

+ 2 - 2
service/auto_task.go

@@ -187,8 +187,8 @@ func AutoTask() error {
 	}
 	//定时任务
 	// spec := "*/10 * * * * ?" //cron表达式,每10秒一次
-	spec := "0 */2 * * * ?" //cron表达式,每1分钟一次
-	// spec := "0 */30 * * * ?" //cron表达式,每半小时执行一次
+	//spec := "0 */2 * * * ?" //cron表达式,每1分钟一次
+	spec := "0 */30 * * * ?" //cron表达式,每半小时执行一次
 	// spec := "0 0 * * * *" //每小时执行
 	// 添加定时任务,
 	_, err1 := crontab.AddFunc(spec, task1)