Skip to content

Commit

Permalink
Adds the possibility to ignore a service
Browse files Browse the repository at this point in the history
When running the update script, adds the possibility to ignore a
service present in the pybikes lib.
  • Loading branch information
eskerda committed Jul 14, 2014
1 parent b849f0e commit 1840a78
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gyro/configuration.sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@
'db': 0
}

proxify = ['bcycle']
proxify = []

ignore = []
5 changes: 5 additions & 0 deletions update.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from gyro import tasks
from gyro.configuration import redis_server as redis_info
from gyro.configuration import ignore as ignored_services
import pybikes
import keys

Expand All @@ -23,6 +24,7 @@ def enqueueMultiSystem(queue, task, schema, key, network = None):
port=redis_info['port'],
db=redis_info['db']
)

q = Queue('medium', connection=Redis(connection_pool = pool))

parser = argparse.ArgumentParser(description='Process bike sharing networks')
Expand All @@ -46,6 +48,9 @@ def enqueueMultiSystem(queue, task, schema, key, network = None):
task = tasks.updateSystem

for schema in schemas:
if schema['system'] in ignored_services:
print "Ignoring %s !!1one" % schema['system']
continue
if hasattr(keys, schema['system']):
key = eval('keys.%s' % schema['system'])
else:
Expand Down

0 comments on commit 1840a78

Please sign in to comment.