lib/tasks/switchman.rake in switchman-1.2.32 vs lib/tasks/switchman.rake in switchman-1.2.33
- old
+ new
@@ -70,9 +70,13 @@
raw_shard_ids.each do |id|
if id == 'default'
shard_ids << Shard.default.id
elsif id == '-default'
negative_shard_ids << Shard.default.id
+ elsif id == 'primary'
+ shard_ids.concat(Shard.primary.pluck(:id))
+ elsif id == '-primary'
+ negative_shard_ids.concat(Shard.primary.pluck(:id))
elsif id =~ /(-?)(\d+)?\.\.(\.)?(\d+)?/
negative, start, open, finish = $1.present?, $2, $3.present?, $4
raise "Invalid shard id or range: #{id}" unless start || finish
range = []
range << "id>=#{start}" if start