GithubHelp home page GithubHelp logo

Comments (5)

timmolter avatar timmolter commented on September 25, 2024

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.

sripos avatar sripos commented on September 25, 2024

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.

timmolter avatar timmolter commented on September 25, 2024

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.

timmolter avatar timmolter commented on September 25, 2024

@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.

sripos avatar sripos commented on September 25, 2024

Thanks for the response Tim, I will try to get it done today.... Thanks -

from dropwizard-sundial.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.