summaryrefslogtreecommitdiff
path: root/settings.py
diff options
context:
space:
mode:
authorPrabhu Ramachandran2011-11-24 19:09:42 +0530
committerPrabhu Ramachandran2011-11-24 19:09:42 +0530
commit2fd98c77cb06d078ad82f60abfe769cd7666e229 (patch)
tree33ce2cadc7c2e0610cb490df449d3a850c1ece28 /settings.py
parenta1b550e09475da1cdf345429df7708a7ae82d38f (diff)
downloadonline_test-2fd98c77cb06d078ad82f60abfe769cd7666e229.tar.gz
online_test-2fd98c77cb06d078ad82f60abfe769cd7666e229.tar.bz2
online_test-2fd98c77cb06d078ad82f60abfe769cd7666e229.zip
ENH: Creating a ServerPool for code checks
Changed the server so we use a pool of servers managed with a Queue of available servers. The XML/RPC client is also changed to handle connection failures gracefully. This is because XML/RPC cannot have more than 2 connections at a given time, so if there is an error, we wait for a random amount of time and try again. This allows us to handle fairly large loads nicely.
Diffstat (limited to 'settings.py')
-rw-r--r--settings.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/settings.py b/settings.py
index ebfec30..c007867 100644
--- a/settings.py
+++ b/settings.py
@@ -5,10 +5,15 @@ from os.path import dirname, join, basename, abspath
DEBUG = True
TEMPLATE_DEBUG = DEBUG
-# The ports the Python server should run on. This will run one separate
+# The ports the code server should run on. This will run one separate
# server for each port listed in the following list.
SERVER_PORTS = [8001] # range(8001, 8026)
+# The server pool port. This is the server which returns available server
+# ports so as to minimize load. This is some random number where no other
+# service is running. It should be > 1024 and less < 65535 though.
+SERVER_POOL_PORT = 53579
+
# Timeout for the code to run in seconds. This is an integer!
SERVER_TIMEOUT = 2