Code Monkey home page Code Monkey logo

example-spring's Introduction

JobRunr example

This repository shows an advanced example how you can integrate JobRunr with spring.io. In this example, Jobs are created via a web frontend (the webapp module) and processed in a different JVM (the processingapp module).

An easier example using spring.io can be found here

About this project

This project exists out of 3 modules:

  • core: this project contains MyService, a simple spring service with two example methods which you want to run in a backgroundserver.
  • processingapp: this app is a Spring Console application and runs indefinitely. It polls for new background jobs and processes them when they arrive. It contains only a two classes:

    the thing to note here is the application.properties where the server and the dashboard are enabled

  • webapp: this is a Spring Rest Webapp that enqueues new background jobs. It contains a simple RestController called JobController which contains some methods (= endpoints) to enqueue jobs.

How to run this project:

  • clone the project and open it in your favorite IDE that supports gradle
  • First, run the main method from the JobServerApplication in the processingapp module and also keep it running
  • Run the main method from the WebApplication in the webapp module and keep it running
  • Open your favorite browser:

example-spring's People

Contributors

auloin avatar rdehuyss avatar salmar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

example-spring's Issues

Delete by JobID not working for me

    @GetMapping(value = "/delete-job", produces = {MediaType.TEXT_PLAIN_VALUE})
    public String deleteJob(@RequestParam(value = "jobId") String jobId) {
        jobScheduler.delete(jobId);
        return "Job Deleted: " + jobId;

    }

I tried to add up in controller new method to delete the Job By Job ID ..... It getting executed but Job still showing scheduled in dashboard.

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.