Comments (5)
No, you shouldn't have to explicitly implement the resources. Are you adding the Sundial bundle to the Dropwizard environment properly as shown in the README?
from dropwizard-sundial.
Yes... it has been added... BTW, the POST command should be executed on the port (9006) on which the application is running or the admin port (9007)?
public void initialize(Bootstrap<PropsConfig> bootstrap) {
bootstrap.addBundle(TenacityBundleBuilder.<PropsConfig> newBuilder().configurationFactory(new PropsExternalDependencyBundleConfigurationFactory()).build());
bootstrap.addBundle(new SundialBundle<PropsConfig>() {
@Override
public SundialConfiguration getSundialConfiguration(PropsConfig configuration) {
return configuration.getSundialConfiguration();
}
} );
}
from dropwizard-sundial.
If I run curl -X POST "http://localhost:9090/admin/tasks/stopjob?JOB_NAME=SampleJob3"
,
I see:
0:0:0:0:0:0:0:1 - - [18/Apr/2016:09:03:49 +0000] "POST /admin/tasks/stopjob?JOB_NAME=SampleJob3 HTTP/1.1" 200 - "-" "curl/7.43.0" 9
Take a look at https://github.com/timmolter/XDropWizard, as it's a perfectly working example. You should be using the admin port I believe.
from dropwizard-sundial.
@sripos My apologies. I just noticed today that you actually do need to explicitly add the tasks in your apps run
method like this:
environment.admin().addTask(new LockSundialSchedulerTask());
environment.admin().addTask(new UnlockSundialSchedulerTask());
environment.admin().addTask(new RemoveJobTriggerTask());
environment.admin().addTask(new AddCronJobTriggerTask());
environment.admin().addTask(new StartJobTask());
environment.admin().addTask(new StopJobTask());
environment.admin().addTask(new RemoveJobTask());
environment.admin().addTask(new AddJobTask());
I mistakenly assumed it was all taken care of automatically. From the future 1.0.0-rc2.0
release it will be automatically configured, but before that you need to explicitly add all the tasks yourself. Sorry for that! I'll update the readme as well.
from dropwizard-sundial.
Thanks for the response Tim, I will try to get it done today.... Thanks -
from dropwizard-sundial.
Related Issues (15)
- Include metrics HOT 1
- guice injection compatibility for jobs HOT 4
- Adding job manually HOT 2
- Jobs cannot be loaded if the project is inside a directory with a space in its name HOT 3
- Create new `Manual` trigger annotation HOT 7
- Creates new scheduled object on every run.
- Add note in README aboput Metrics
- How to wait until threads spawned by job are complete? HOT 6
- Tasks API for managing the jobs return 404 HOT 1
- Will this work in clustered environment ? HOT 1
- Sundial Scheduler failed to initialize: Unexpected problem: No resource for MyJob HOT 2
- Set thread pool priority? HOT 2
- Using JDBI HOT 1
- Not able to start job manually HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dropwizard-sundial.