Permalink
Browse files

killall.sh script

  • Loading branch information...
1 parent 2c9130a commit 9c694c162d1aa98165b10fc795de70a15a767ed9 Jiang Bian committed Nov 4, 2013
Showing with 6 additions and 1 deletion.
  1. +3 −0 killall.sh
  2. +1 −1 tweetf0rm/proxies.py
  3. +2 −0 tweetf0rm/scheduler.py
View
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+kill -9 `ps e | grep tweetf0rm | grep -v grep | awk '{print $1}'`
View
@@ -31,7 +31,7 @@ def check_proxy(proxy, timeout):
else: else:
return False, None return False, None
except Exception as exc: except Exception as exc:
- logger.debug("proxy [%s] failed: %s"%(p['proxy'], exc)) + logger.info("proxy [%s] failed: %s"%(p['proxy'], exc))
return False, None return False, None
def proxy_checker(proxies): def proxy_checker(proxies):
View
@@ -28,6 +28,8 @@ def __init__(self, node_id, config={}, proxies=[]):
self.proxy_list = proxy_checker(proxies) self.proxy_list = proxy_checker(proxies)
+ logger.info("number of live proxies: %d"%(len(self.proxy_list)))
+
# each process only get one apikey... if there are more proxies than apikeys, each process can get more than one proxy that can be rotated when one fails. # each process only get one apikey... if there are more proxies than apikeys, each process can get more than one proxy that can be rotated when one fails.
number_of_processes = min(len(self.config['apikeys']), len(self.proxy_list)) number_of_processes = min(len(self.config['apikeys']), len(self.proxy_list))

0 comments on commit 9c694c1

Please sign in to comment.