mirror of https://github.com/CIRCL/url-abuse
Merge branch 'master' into travis
commit
f0d9e5d29f
|
@ -1,3 +1,9 @@
|
|||
[submodule "uwhoisd"]
|
||||
path = uwhoisd
|
||||
url = https://github.com/Rafiot/uwhoisd.git
|
||||
[submodule "faup"]
|
||||
path = faup
|
||||
url = https://github.com/stricaud/faup.git
|
||||
[submodule "redis"]
|
||||
path = redis
|
||||
url = https://github.com/antirez/redis.git
|
||||
|
|
23
.travis.yml
23
.travis.yml
|
@ -4,6 +4,7 @@ python:
|
|||
- "2.7"
|
||||
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
addons:
|
||||
apt:
|
||||
|
@ -11,7 +12,7 @@ addons:
|
|||
- parallel
|
||||
|
||||
install:
|
||||
- git clone git://github.com/stricaud/faup.git
|
||||
# Faup
|
||||
- pushd faup/build
|
||||
- cmake .. && make
|
||||
- sudo make install
|
||||
|
@ -20,21 +21,33 @@ install:
|
|||
- pushd faup/src/lib/bindings/python
|
||||
- python setup.py install
|
||||
- popd
|
||||
- pip install -r requirements.txt
|
||||
# redis
|
||||
- pushd redis
|
||||
- make
|
||||
- popd
|
||||
# Run uwhoisd
|
||||
- pushd uwhoisd
|
||||
- python setup.py install
|
||||
- ../redis/src/redis-server extra/redis.conf --daemonize yes
|
||||
- sleep 10
|
||||
- uwhoisd extra/uwhoisd.ini &
|
||||
- popd
|
||||
# Other Python deps
|
||||
- pip install -r requirements.txt
|
||||
- pip install coveralls
|
||||
- pip install codecov
|
||||
- cp config.ini.sample config.ini
|
||||
|
||||
before_script:
|
||||
- redis-server /etc/redis/redis.conf --port 6334 --daemonize yes
|
||||
- cp config.ini.sample config.ini
|
||||
- redis/src/redis-server --port 6334 --daemonize yes
|
||||
- sleep 10
|
||||
|
||||
script:
|
||||
- ./worker.py &
|
||||
- ./runapp.py &
|
||||
- sleep 30
|
||||
- sleep 5
|
||||
- curl http://0.0.0.0:5100/
|
||||
- sleep 20
|
||||
|
||||
after_success:
|
||||
- coveralls
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 9a1440d23290670b4c67d4b15cee19f534adadc7
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 83b862a30ee90ee5f85eefcc63ff5241b501f073
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from datetime import date, timedelta
|
||||
import redis
|
||||
|
||||
|
||||
def perdelta(start, end, delta):
|
||||
curr = start
|
||||
while curr < end:
|
||||
yield curr
|
||||
curr += delta
|
||||
|
||||
r = redis.Redis('localhost', 6334, db=1)
|
||||
|
||||
for result in perdelta(date(2015, 03, 01), date(2015, 12, 12), timedelta(days=1)):
|
||||
val = r.zcard('{}_submissions'.format(result))
|
||||
print('{},{}'.format(result, val))
|
Loading…
Reference in New Issue