Sha256: c40f1c706150daf95c1a34f9c3f19e36c8bf9ef9958171b1ce2b21c0e97e2c14

Contents?: true

Size: 1.33 KB

Versions: 3

Compression:

Stored size: 1.33 KB

Contents

# Metrics

Metrics calculations must be executed everyday. Some `rake task` have been added to perform it.

- To execute all metrics at once. Related to previous date from *today*

  ```ruby
  bundle exec rake decidim:metrics:all
  ```

- To execute an specific metric. Related to previous date from *today*

  ```ruby
  bundle exec rake decidim:metrics:one["<metric name>"]
  ```

- To execute metrics for a given date (all or an specific one)

  ```ruby
  bundle exec rake decidim:metrics:all["YYYY-MM-DD"]
  bundle exec rake decidim:metrics:one["<metric name>","YYYY-MM-DD"]
  ```

## Current available metric names

- *users*, confirmed Users
- *proposals*, available Proposals
- *accepted_proposals*, currently accepted Proposals
- *votes*, votes in Proposals
- *assemblies*, public Assemblies
- *participatory_processes*, public ParticipatoryProcesses
- *results*, Results in Accountabilities
- *comment*, Comments generated by users, related to public elements and not *hidden*
- *meetings*, public Meetings

## To configure it correctly

- A **crontab** line must be added to your server to maintain them updated daily. You could use [Whenever](https://github.com/javan/whenever) to manage it directly from the APP
- A **ActiveJob** queue, like [Sidekiq](https://github.com/mperham/sidekiq) or [DelayedJob](https://github.com/collectiveidea/delayed_job/)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
decidim-0.15.2 docs/advanced/metrics.md
decidim-0.15.1 docs/advanced/metrics.md
decidim-0.15.0 docs/advanced/metrics.md