Skip to content

Commit

Permalink
Added Scheduler API support, Frequency and typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Manu committed Aug 22, 2016
1 parent 3810279 commit 6e98ebe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ PublisherUsername=guest
PublisherPassword=guest
PublisherPort=5672
PublisherVirtualHost=/
PublisherBroadcastExchange=cylops.ceilometer.collector.broadcast
PublisherBroadcastExchange=cyclops.ceilometer.collector.broadcast
PublisherDispatchExchange=cyclops.ceilometer.collector.dispatch

# Hibernate connection credentials
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ private static void checkAndStartServer(Component component) {
// also start collection immediately
Scheduler scheduler = Scheduler.getInstance();
int frequency = Loader.getSettings().getSchedulerSettings().getFrequency();
scheduler.addRunner(new OpenStackCeilometerClient(), 0, 600, TimeUnit.SECONDS);
scheduler.addRunner(new OpenStackCeilometerClient(), 0, frequency, TimeUnit.SECONDS);
scheduler.start();
outputProgressBar(NO_EMPTY_LINE, EMPTY_LINE);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package ch.icclab.cyclops.application;

import ch.icclab.cyclops.endpoint.RootEndpoint;
import ch.icclab.cyclops.endpoint.SchedulerEndpoint;
import ch.icclab.cyclops.endpoint.StatusEndpoint;
import ch.icclab.cyclops.load.Loader;
import ch.icclab.cyclops.load.Settings;
Expand Down Expand Up @@ -72,6 +73,9 @@ public Restlet createInboundRoot() {
router.attach(StatusEndpoint.ENDPOINT, StatusEndpoint.class);
counter.registerEndpointWithoutCounting(StatusEndpoint.ENDPOINT);

router.attach(SchedulerEndpoint.ENDPOINT, SchedulerEndpoint.class);
counter.registerEndpoint(SchedulerEndpoint.ENDPOINT);


logger.trace("Routes for OpenStack collector microservice successfully created");

Expand Down

0 comments on commit 6e98ebe

Please sign in to comment.