Germey преди 4 години
родител
ревизия
f91725475c
променени са 3 файла, в които са добавени 16 реда и са изтрити 4 реда
  1. 1 1
      examples/usage.py
  2. 2 2
      proxypool/setting.py
  3. 13 1
      supervisord.conf

+ 1 - 1
examples/usage.py

@@ -2,7 +2,7 @@ import requests
 
 
 proxypool_url = 'http://127.0.0.1:5555/random'
-target_url = 'http://httpbin.org/get'
+target_url = 'https://antispider5.scrape.center/'
 
 
 def get_random_proxy():

+ 2 - 2
proxypool/setting.py

@@ -76,6 +76,6 @@ ENABLE_TESTER = env.bool('ENABLE_TESTER', True)
 ENABLE_GETTER = env.bool('ENABLE_GETTER', True)
 ENABLE_SERVER = env.bool('ENABLE_SERVER', True)
 
-logger.add(env.str('LOG_RUNTIME_FILE', join(LOG_DIR, 'runtime.log')), level='DEBUG', rotation='1 week', retention='20 days')
-logger.add(env.str('LOG_ERROR_FILE', join(LOG_DIR, 'error.log')), level='ERROR', rotation='1 week')
+# logger.add(env.str('LOG_RUNTIME_FILE', join(LOG_DIR, 'runtime.log')), level='DEBUG', rotation='1 week', retention='20 days')
+# logger.add(env.str('LOG_ERROR_FILE', join(LOG_DIR, 'error.log')), level='ERROR', rotation='1 week')
 

+ 13 - 1
supervisord.conf

@@ -5,13 +5,25 @@ nodaemon=true
 process_name=tester
 command=python3 run.py --processor tester
 directory=/app
+stdout_logfile=/dev/stdout
+stdout_logfile_maxbytes=0
+stderr_logfile=/dev/stderr
+stderr_logfile_maxbytes=0
 
 [program:getter]
 process_name=getter
 command=python3 run.py --processor getter
 directory=/app
+stdout_logfile=/dev/stdout
+stdout_logfile_maxbytes=0
+stderr_logfile=/dev/stderr
+stderr_logfile_maxbytes=0
 
 [program:server]
 process_name=server
 command=python3 run.py --processor server
-directory=/app
+directory=/app
+stdout_logfile=/dev/stdout
+stdout_logfile_maxbytes=0
+stderr_logfile=/dev/stderr
+stderr_logfile_maxbytes=0