1namespace :epets do
 
2  namespace :constituencies do
 
3    desc "Add task to the queue to constituency information from the Parliament API"
 
4    task :import => :environment do
 
5      Task.run("epets:constituencies:import") do
 
6        ImportConstituenciesJob.perform_later
 
7      end
 
8    end
 
 9
 
10    desc "Add task to the queue to refresh constituency information from the Parliament API"
 
11    task :refresh => :environment do
 
12      Task.run("epets:constituencies:refresh") do
 
13        RefreshConstituenciesJob.perform_later
 
14      end
 
15    end
 
 
17    desc "Add task to the queue to refresh constituency party information from the Parliament API"
 
18    task :refresh => :environment do
 
19      Task.run("epets:constituencies:refresh_party") do
 
20        RefreshConstituencyPartyJob.perform_later
 
21      end
 
22    end
 
23  end
 
24end