From 34844759093b3bd8a27697ea60dce0f2d18532f7 Mon Sep 17 00:00:00 2001 From: lxnay Date: Thu, 24 Jul 2008 07:48:02 +0000 Subject: [PATCH] Entropy/Entropy Repository Daemon example: - add support for UGC git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2290 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- server/entropy-repository-daemon | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/server/entropy-repository-daemon b/server/entropy-repository-daemon index ac396dacc..d9c83db6b 100644 --- a/server/entropy-repository-daemon +++ b/server/entropy-repository-daemon @@ -14,7 +14,7 @@ if "--nostdout" in sys.argv: do_stdout_logging = False import entropyTools, exceptionTools -from entropy import RepositorySocketServerInterface, phpBB3AuthInterface, phpbb3Authenticator, phpbb3Commands +from entropy import RepositorySocketServerInterface, phpBB3AuthInterface, phpbb3Authenticator, phpbb3Commands, DistributionUGCCommands connection_data = { @@ -24,6 +24,16 @@ connection_data = { 'password': 'mypassword', 'dbname': 'phpbb_db' } +ugc_connection_data = { + 'hostname': 'localhost', + 'username': 'entropy', + 'password': 'password', + 'dbname': 'entropy', + 'google_email': 'your@gmail.com', # valid google account + 'google_password': 'yourgmailpassword', # valid google e-mail +} +ugc_store_path = "/path/to/your/ugc/store" +ugc_args = [ugc_connection_data,ugc_store_path] # configure my repositories repositories = { @@ -46,7 +56,7 @@ srv = RepositorySocketServerInterface( repositories = repositories, stdout_logging = do_stdout_logging, sock_auth = sock_auth, - external_cmd_classes = [phpbb3Commands] + external_cmd_classes = [phpbb3Commands,(DistributionUGCCommands,ugc_args,)] ) if do_ssl: srv_ssl = RepositorySocketServerInterface( @@ -54,7 +64,7 @@ if do_ssl: repositories = repositories, stdout_logging = do_stdout_logging, sock_auth = sock_auth, - external_cmd_classes = [phpbb3Commands] + external_cmd_classes = [phpbb3Commands,(DistributionUGCCommands,ugc_args,)] ) task = entropyTools.parallelTask(run_srv, srv)