class WeightedCompletenessMetricWorker < MetricsWorker

  def perform(repository_name)
    repository = Repository.find repository_name
    schema = JSON.parse File.read 'public/ckan-schema.json'
    schema = self.class.symbolize_keys schema
    weights = 'public/ckan-weight.yml'
    metric = Metrics::WeightedCompleteness.new(weights)
    compute(repository, metric, schema)
  end

end

Add weighted completeness metric worker
Add weighted completeness metric worker

I have added the weighted completeness metric worker which is more or
less the same code as the completeness metric code. I probably should
delegate some of the common code into the completeness metric only.

Signed-off-by: Konrad Reiche <4ff0213f56e2082fcd8c882d04c546881c579ce4@gmail.com>
