Removed obsolete --loop option from jobrunner
authorJean-Michel Nirgal Vourgère <jmv@nirgal.com>
Thu, 11 Nov 2010 01:14:06 +0000 (01:14 +0000)
committerJean-Michel Nirgal Vourgère <jmv@nirgal.com>
Thu, 11 Nov 2010 01:14:06 +0000 (01:14 +0000)
INSTALL
bin/jobrunner.py

diff --git a/INSTALL b/INSTALL
index df096db111e60a95ae065add431c5af26ba1e2b9..958b60646083d847cfdc0a85fefc4ab5983f6ddb 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -75,7 +75,7 @@ python -m ais.inputs.run --db --background
 = Job queue runner
 ==================
 umask 002
-python -m ais.jobrunner --loop --daemon
+python -m ais.jobrunner --daemon
 
 = Apache setup
 ==============
index 577fabc7b27bc85f350edc0971d709e94a5feca7..bb5aab39db7684f893f9a37b51658a998500ff99 100755 (executable)
@@ -90,9 +90,6 @@ def main():
     parser.add_option('--daemon',
         action='store_true', dest='daemonize', default=False,
         help='runs as a daemon')
-    parser.add_option('--loop',
-        action='store_true', dest='loop', default=False,
-        help='keeps running forever')
     options, args = parser.parse_args()
 
     if args:
@@ -121,23 +118,20 @@ def main():
         # todo: pidfile= with import lockfile (squeeze)
         dctx.open()
 
-    if options.loop:
-        if os.path.exists(SOCK_FILENAME):
-            os.remove(SOCK_FILENAME)
-        server = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
-        server.bind(SOCK_FILENAME)
-        os.chmod(SOCK_FILENAME, 0777)
-
-        while True:
-            r = runjob()
-            if r == 0:
-                server.recv(1024) # blocks
-            elif r == 1:
-                logging.error('Allready running?')
-                sys.exit(1)
-            # else loop now
-    else:
-        runjob()
+    if os.path.exists(SOCK_FILENAME):
+        os.remove(SOCK_FILENAME)
+    server = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
+    server.bind(SOCK_FILENAME)
+    os.chmod(SOCK_FILENAME, 0777)
+
+    while True:
+        r = runjob()
+        if r == 0:
+            server.recv(1024) # blocks
+        elif r == 1:
+            logging.error('Allready running?')
+            sys.exit(1)
+        # else loop now
 
 if __name__ == '__main__':
     main()