This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pystalkd.Beanstalkd import Connection | |
conn = Connection(host='127.0.0.1', port=11300) | |
# watch the queue1 tube | |
conn.watch('queue1') | |
# stop watching the default tube | |
conn.ignore('default') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
from django.test.runner import DiscoverRunner | |
class ParallelTestRunner(DiscoverRunner): | |
""" | |
Uses a combination of hours, minutes and microseconds. This should avoid any db name conflicts and when | |
Django creates the db, the name will abide by the MySQL 16 character limit. | |
""" | |
settings.DATABASES[DEFAULT_DB_ALIAS]['NAME'] = datetime.utcnow().strftime('%H%M%f') |