Переглянути джерело

Add datetime to Upgrade/Provision Procedures

Sasan Torabkheslat 5 роки тому
батько
коміт
0ec210da07
2 змінених файлів з 20 додано та 12 видалено
  1. 18 11
      .idea/workspace.xml
  2. 2 1
      main.cpp

+ 18 - 11
.idea/workspace.xml

@@ -14,7 +14,6 @@
     <list default="true" id="6938f4e3-b9b8-4c34-bea6-8fc5ace411e6" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/main.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/main.cpp" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/soapcwmpService.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/soapcwmpService.cpp" afterDir="false" />
     </list>
     <ignored path="$PROJECT_DIR$/cmake-build-debug/" />
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -32,8 +31,8 @@
       <file pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/main.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="366">
-              <caret line="609" column="34" selection-start-line="609" selection-start-column="34" selection-end-line="609" selection-end-column="34" />
+            <state relative-caret-position="239">
+              <caret line="594" column="8" selection-start-line="594" selection-start-column="8" selection-end-line="594" selection-end-column="8" />
               <folding>
                 <element signature="e#604#788#0" />
                 <element signature="e#790#856#0" />
@@ -238,7 +237,7 @@
       <workItem from="1577875009389" duration="1490000" />
       <workItem from="1577888800205" duration="3932000" />
       <workItem from="1578124895054" duration="43427000" />
-      <workItem from="1579512098384" duration="3676000" />
+      <workItem from="1579512098384" duration="5529000" />
     </task>
     <task id="LOCAL-00001" summary="Disable InfluxDB">
       <created>1572183659791</created>
@@ -289,11 +288,18 @@
       <option name="project" value="LOCAL" />
       <updated>1578299912171</updated>
     </task>
-    <option name="localTasksCounter" value="8" />
+    <task id="LOCAL-00008" summary="Upgrade Procedures completed">
+      <created>1579597476180</created>
+      <option name="number" value="00008" />
+      <option name="presentableId" value="LOCAL-00008" />
+      <option name="project" value="LOCAL" />
+      <updated>1579597476180</updated>
+    </task>
+    <option name="localTasksCounter" value="9" />
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="305637000" />
+    <option name="totallyTimeSpent" value="307490000" />
   </component>
   <component name="TodoView" selected-index="3">
     <todo-panel id="selected-file">
@@ -308,7 +314,7 @@
     <frame x="1280" y="-181" width="1920" height="1080" extended-state="6" />
     <editor active="true" />
     <layout>
-      <window_info content_ui="combo" id="Project" order="0" sideWeight="0.46380696" visible="true" weight="0.18051118" />
+      <window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.46380696" visible="true" weight="0.18051118" />
       <window_info id="Structure" order="1" sideWeight="0.536193" side_tool="true" weight="0.17891374" />
       <window_info id="Favorites" order="2" sideWeight="0.536193" side_tool="true" weight="0.17891374" />
       <window_info anchor="bottom" id="Message" order="0" />
@@ -320,7 +326,7 @@
       <window_info anchor="bottom" id="TODO" order="6" weight="0.32876712" />
       <window_info anchor="bottom" id="File Transfer" order="7" weight="0.2260274" />
       <window_info anchor="bottom" id="Database Changes" order="8" />
-      <window_info active="true" anchor="bottom" id="Messages" order="9" visible="true" weight="0.26138613" />
+      <window_info anchor="bottom" id="Messages" order="9" visible="true" weight="0.26138613" />
       <window_info anchor="bottom" id="Terminal" order="10" weight="0.32574257" />
       <window_info anchor="bottom" id="Event Log" order="11" side_tool="true" />
       <window_info anchor="bottom" id="Version Control" order="12" weight="0.32876712" />
@@ -370,7 +376,8 @@
     <MESSAGE value="Add Database for Inform and CheckQueue (phase 1)&#10;&#10;Inform : Done&#10;&#10;CheckQueue: In progress...." />
     <MESSAGE value="Add Database for Inform and CheckQueue (phase 1)&#10;&#10;Inform : Done&#10;&#10;CheckQueue: In progress....&#10;&#10;exception handling on json parsing" />
     <MESSAGE value="Add Database for Inform and CheckQueue (phase 1)&#10;                                  &#10;                                  Inform : Done&#10;                                  &#10;                                  CheckQueue: In progress....&#10;                                  &#10;                                  exception handling on json parsing&#10;                                  &#10;                                  update database after sending task to cpe" />
-    <option name="LAST_COMMIT_MESSAGE" value="Add Database for Inform and CheckQueue (phase 1)&#10;                                  &#10;                                  Inform : Done&#10;                                  &#10;                                  CheckQueue: In progress....&#10;                                  &#10;                                  exception handling on json parsing&#10;                                  &#10;                                  update database after sending task to cpe" />
+    <MESSAGE value="Upgrade Procedures completed" />
+    <option name="LAST_COMMIT_MESSAGE" value="Upgrade Procedures completed" />
     <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="true" />
     <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
     <option name="REARRANGE_BEFORE_PROJECT_COMMIT" value="true" />
@@ -769,8 +776,8 @@
     </entry>
     <entry file="file://$PROJECT_DIR$/main.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="366">
-          <caret line="609" column="34" selection-start-line="609" selection-start-column="34" selection-end-line="609" selection-end-column="34" />
+        <state relative-caret-position="239">
+          <caret line="594" column="8" selection-start-line="594" selection-start-column="8" selection-end-line="594" selection-end-column="8" />
           <folding>
             <element signature="e#604#788#0" />
             <element signature="e#790#856#0" />

+ 2 - 1
main.cpp

@@ -596,7 +596,8 @@ int cwmpService::CheckQueue(struct soap *soap, cwmpService *cwmpService1) {
         conn.connect(DATABASE, HOST, USER, PASSWORD, PORT);
         query
                 << "select t.id, d.IMSI , t.action , t.ActionParameters from TaskList as t join Device_List as d on t.IMSI=d.IMSI where d.IP='"
-                << soap->host << "' and t.response is null and t.Active=0 order by id limit 1;";
+                << soap->host
+                << "' and t.response is null and t.Active=0 and t.`datetime` < NOW() order by id limit 1;";
         mysqlpp::StoreQueryResult result = query.store();
         if (result.size() == 0)
             return soap->error = 204;