Fix pgAgent's job query when a host agent is specified
authordpage <dpage@a7884b65-44f6-0310-8a51-81a127f17b15>
Wed, 28 Nov 2007 20:58:01 +0000 (20:58 +0000)
committerdpage <dpage@a7884b65-44f6-0310-8a51-81a127f17b15>
Wed, 28 Nov 2007 20:58:01 +0000 (20:58 +0000)
so that jobs don't execute every time round the loop
regardless of schedule, per Brian Kalbfus.

git-svn-id: svn://svn.pgadmin.org/trunk/pgadmin3@6848 a7884b65-44f6-0310-8a51-81a127f17b15

CHANGELOG
xtra/pgagent/pgAgent.cpp

index 635183d332739bf2581f59796c6218b326d97996..fdb4fa0a94d1a94d9b8b69095021c01274da50b3 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -36,6 +36,9 @@ Changes
 \r
 Date       Dev Ver    Change details\r
 ---------- --- -----  --------------\r
+2007-11-28 DP  1.8.1  Fix pgAgent's job query when a host agent is specified\r
+                      so that jobs don't execute every time round the loop\r
+                      regardless of schedule, per Brian Kalbfus.\r
 2007-11-28 DP  1.8.1  Add EnterpriseDB's default database (edb) to the Server\r
                       dialog's default option.\r
 2007-11-28 DP  1.8.1  Don't allow the user to debug an EnterpriseDB package\r
index 04ba77a507260998ea238e9a3ec0f3109f494e0b..4b794e67b602ebbeaec4310cc9d3944af1fe282f 100644 (file)
@@ -88,7 +88,7 @@ int MainRestartLoop(DBconn *serviceConn)
             wxT(" WHERE jobenabled ")
             wxT("   AND jobagentid IS NULL ")
             wxT("   AND jobnextrun <= now() ")
-            wxT("   AND jobhostagent = '' OR jobhostagent = '") + hostname + wxT("'")
+            wxT("   AND (jobhostagent = '' OR jobhostagent = '") + hostname + wxT("')")
             wxT(" ORDER BY jobnextrun"));
 
         if (res)