Just changed the book example to use random.sample.
 
Anthony

On Friday, July 22, 2011 12:55:46 PM UTC-4, Anthony wrote:

> On Friday, July 22, 2011 12:28:24 PM UTC-4, nils wrote: 
>>
>> Hi Anthony, 
>>
>> yes, migrate is set for fields in the  aut table. 
>>
>> Also another note, shuffle did not work for me I have to, from random
>> import sample.
>> then change
>> DAL(sample(['mysql connection string','mysql connection
>> string'],1),migrate_enabled=False)
>>
>> Yes, good point, shuffle returns None (after mutating the list in place), 
> so the example will not work properly. Note, if you sample only 1 slave db, 
> that's fine, but you're better off returning a permutation of the whole list 
> -- then, if DAL can't connect to one of the db's, it will try the next one 
> in the list instead of failing.
>  
> Anthony
>  
>

Reply via email to