Use hyphen for metric identifier

Once again I try to use hyphens instead of underscores for identifying
the metric. While it is more tedious to write them directly it is a lot
easier when dealing with them in the interface to the web application.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Update path checker function

The path checker function had a typo. Again, the path is now checked
against the current window path location.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Work towards refactoring worker scheduling

I have started to refactor the job scheduling procedure. I have started
to adjust the paths to their resourceful equivalents and created a new
controller.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Add job model class

I have added a model class to represent a scheduled job. This is better
than storing the job inside a controller's class variable as this might
be lost at some point. For example if the code is reloaded.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Modernize Sidekiq script

I have updated the Sidekiq script in the same way I have improved the
script for the Metadata Harvester. Now Sidekiq is run as a daemon. It
uses a defined logging file and in which file the PID is stored.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Adapt worker code to MongoDB requirements

Finally, metric jobs can now be executed with MongoDB as well. This was
more or less the last step to replace Elasticsearch with MongoDB.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Persist Sidekiq jobs more properly

There are still some small errors in the code when it comes to
persisting the Sidekiq jobs. This commit fixes some.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Replace Elasticsearch with MongoDB for Travis CI

My Travis CI builds are failing. This is due to the lack of a MongoDB
instance. I hope this small fix makes it working again.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>