jobrunr

An extremely easy way to perform background processing in Java. Backed by persistent storage. Open and free for commercial use.

OTHER License

Stars
2.3K

Bot releases are visible (Hide)

jobrunr - v5.1.2

Published by rdehuyss over 2 years ago

New features

Bugfixes

jobrunr - v5.1.1 - Hotfix for ClosedFileSystemException

Published by rdehuyss over 2 years ago

Bugfixes

  • #447 java.nio.file.ClosedFileSystemException
  • #446 Dockerized Jobrunr Inside JHipster Project Is Not Starting
jobrunr - v5.1.0

Published by rdehuyss over 2 years ago

Improvements

  • #417 JobRunr now supports Kotlin 1.6.20

Bugfixes

  • #432 JobRunrConfiguration.useJsonMapper doesn't update internal JobMapper
  • #431 The background server stops if JobDetails are not deserializable.
    JobRunr by default already checks whether all jobs exist (e.g. classes moved because of refactoring, ... ). If they do not exist, this is shown in the dashboard.
    However sometimes Job parameters change and they are not deserializable anymore. In this case, JobRunr would stop processing jobs due to too many deserialization exceptions. This is now solved and the job just fails.
    In the Pro version, you can now add a unit test using the JobMigrationGuard to validate whether all your jobs in production keep working with your local changes.
  • #427 java.nio.file.ClosedFileSystemException caused by race condition

Miscellaneous

On top of that JobRunr now also shares some anonymous data usage (the amount of succeeded jobs) for marketing purposes (a counter on the website how many jobs in total were processed by JobRunr 😂). Off-course you can opt-out for this using a simple setting.

jobrunr - v5.0.1

Published by rdehuyss over 2 years ago

Improvements

  • #411 Ability to keep dashboard logs after job success

Bugfixes

  • #401 RetryFilter always falls into number of retries from Job annotation
  • #407 Newest version of JobRunr has dependency on Spring version with critical vulnerability
  • #416 Jobrunr failed to start With Jobrunr (jobrunr-spring-boot-starter 5.0.0) version when storage is Mongo Db after dockerized the application
jobrunr - v5.0.0

Published by rdehuyss over 2 years ago

JobRunr 5.0.0 & JobRunr Pro 5.0.0 released!

Celebration time!

I'm pleased to announce the release of JobRunr v5.0.0 (which is now available via Maven Central) and JobRunr Pro v5.0.0 which is available for customers with a subscription. As this is a major release, there are also some small breaking changes.

Some great new features to both JobRunr and JobRunr Pro!

New features in JobRunr

This release again adds quite some new improvements to JobRunr:

  • Scheduled jobs with repeating interval: since JobRunr 5.0.0, you can now schedule recurring jobs using an interval. This means you can now also schedule recurring jobs as follows: BackgroundJob.scheduleRecurringly("my-recurring-job", Duration.parse("PT5D"), () -> service.doWork());
    Thank you @Daniela!
  • Spring Native support: Thanks to @JoshLong, JobRunr now out-of-the-box supports Spring Native. Use the dependency jobrunr-spring-boot-native and your app will launch in milliseconds.
  • MDC support: this release introduces support for the Mapped Diagnostics Context of SLF4J. If you have a correlation id available and you log something in your job, this correlation id will still be available. You can even use any value of the MDC context in the display name.
  • Cron extended with last day of month: Need to run some jobs on the last day of the month? This is now possible thanks to @asahaf as the JobRunr Cron expression parser now supports last-day-of-week and last-day-of-month syntax.
  • Default Number of Retries: You can now easily change the default number of retries via the JobRunr Spring Boot Starter, the Micronaut integration and the Quarkus Extension configuration.
  • Easier integration with multiple databases: Are you running the JobRunr Spring Boot Starter, the Micronaut integration or the Quarkus Extension and do you have multiple databases available in your application (e.g. an SQL database and a Mongo DB or ElasticSearch instance)? As of JobRunr 5.0.0, you can specify which database to use in this case thanks to the extended configuration. Just specify the database type and JobRunr will select that database.
  • MicroMeter integration: This release also adds support for MicroMeter in the JobRunr Fluent Api configuration.
  • Performance improvement: Before JobRunr 5.0.0, all the recurring jobs were constantly reloaded from the StorageProvider when JobRunr checked for new work. This is now cached and only reloaded when the number of jobs changes (e.g. a delete happens).
  • Dashboard ✋ Google: I noticed that there were some JobRunr dashboards publicly available and indexed by Google. As of now, the JobRunr dashboard has a noIndex and noFollow meta tag so that your jobs stay private.

New features in JobRunr Pro

JobRunr Pro also received a lot of new features!

  • Transaction plugin: are you running the JobRunr Spring Boot Starter, the Micronaut integration? Then as of v5.0.0, JobRunr out-of-the-box participates in the transactions created by these frameworks.
  • Instant processing: JobRunr Pro adds some magic and now comes with instant processing of jobs. Just enqueue a job and processing will instantly begin - no need to wait for the pollInterval.
  • Easy JobFilters: JobRunr has the concept of JobFilters to easily extend the functionality of JobRunr. In JobRunr Pro, this becomes even easier as any Spring / Micronaut / Quarkus bean that implements the JobClientFilter or JobServerFilter will automatically be registered in JobRunr.
  • Improved serverTags: JobRunr Pro uses ServerTags to specify on which server a Job can run. From now on, you can even limit to run a job on the same server that scheduled it using the annotation @Job(runOnServerWithTag = "%CURRENT_SERVER")
  • enqueueOrReplace and scheduleOrReplace: are you creating jobs with your own UUID? By default, JobRunr ignores any new job that is enqueued or scheduled if it was already created before as it allows to process jobs in a cluster only once. But do you need to replace that job for some reason? Using the new enqueueOrReplace and scheduleOrReplace methods it is now possible to update existing jobs at any point in the lifecycle of that job.
  • Job Results: do you want to return the result from your job to a client? JobRunr Pro now captures the result of a job, serializes it to JSON and saves it to the database. Using the JobScheduler, you can then query for the result of a job. It comes with a smart query algorithm that takes into account average processing time of that type of job and it makes sure that you don't overload the database if you for example have clients querying for the result in a while loop.
  • Dashboard improvements: the JobRunr Pro dashboard has improved a lot! You can now requeue or delete all failed jobs at once. A real time-saver.

Breaking changes:

  • all existing recurring jobs are not compatible anymore due to the support for recurring jobs using an interval. Please make sure to have no recurring jobs nor scheduled jobs in your application before upgrading.
  • the job metadata is now cleared as soon as the job succeeded. There are 2 reasons for this: storage savings in your storage provider and the fact that it was used to return results from jobs without any back-off policy and thus negatively impacting the performance of JobRunr. But, JobRunr Pro now supports returning results from jobs!
  • if you are using ElasticSearch, you will need to update your ElasticSearch dependencies as a bug was introduced by Elastic in ElasticSearch 7.16
  • all dependencies have been updated to the latest version - make sure to upgrade your dependencies too.

👏 Special thanks to ...

Daniela Tumbraegel, ShawnNest for the PR's and Josh Long fun pairing session to add support for Spring Boot Native - the Spring guys are really amazing! I also want to thank Pei-Tang and Jan Holger for sponsoring me and making sure I have enough caffein!

All improvements & bugfixes

jobrunr - v5.0.0-RC1

Published by rdehuyss over 2 years ago

JobRunr 5.0.0-RC1 & JobRunr Pro 5.0.0-RC1

Release candidate!

Note: JobRunr 5.0.0 and JobRunr Pro 5.0.0 are currently release candidates. I expect to release JobRunr 5.0.0 by the end of March 2022.

Celebration time!

I'm pleased to announce the release of JobRunr v5.0.0 (which is now available via Maven Central) and JobRunr Pro v5.0.0 which is available for customers with a subscription. As this is a major release, there are also some small breaking changes.

Some great new features to both JobRunr and JobRunr Pro!

New features in JobRunr

This release again adds quite some new improvements to JobRunr:

  • Scheduled jobs with repeating interval: since JobRunr 5.0.0, you can now schedule recurring jobs using an interval. This means you can now also schedule recurring jobs as follows: BackgroundJob.scheduleRecurringly("my-recurring-job", Duration.parse("PT5D"), () -> service.doWork());
    Thank you @Daniela!
  • Spring Native support: Thanks to @JoshLong, JobRunr now out-of-the-box supports Spring Native. Use the dependency jobrunr-spring-boot-native and your app will launch in milliseconds.
  • MDC support: this release introduces support for the Mapped Diagnostics Context of SLF4J. If you have a correlation id available and you log something in your job, this correlation id will still be available. You can even use any value of the MDC context in the display name.
  • Cron extended with last day of month: Need to run some jobs on the last day of the month? This is now possible thanks to @asahaf as the JobRunr Cron expression parser now supports last-day-of-week and last-day-of-month syntax.
  • Default Number of Retries: You can now easily change the default number of retries via the JobRunr Spring Boot Starter, the Micronaut integration and the Quarkus Extension configuration.
  • Easier integration with multiple databases: Are you running the JobRunr Spring Boot Starter, the Micronaut integration or the Quarkus Extension and do you have multiple databases available in your application (e.g. an SQL database and a Mongo DB or ElasticSearch instance)? As of JobRunr 5.0.0, you can specify which database to use in this case thanks to the extended configuration. Just specify the database type and JobRunr will select that database.
  • MicroMeter integration: This release also adds support for MicroMeter in the JobRunr Fluent Api configuration.
  • Performance improvement: Before JobRunr 5.0.0, all the recurring jobs were constantly reloaded from the StorageProvider when JobRunr checked for new work. This is now cached and only reloaded when the number of jobs changes (e.g. a delete happens).
  • Dashboard ✋ Google: I noticed that there were some JobRunr dashboards publicly available and indexed by Google. As of now, the JobRunr dashboard has a noIndex and noFollow meta tag so that your jobs stay private.

New features in JobRunr Pro

JobRunr Pro also received a lot of new features!

  • Transaction plugin: are you running the JobRunr Spring Boot Starter, the Micronaut integration? Then as of v5.0.0, JobRunr out-of-the-box participates in the transactions created by these frameworks.
  • Instant processing: JobRunr Pro adds some magic and now comes with instant processing of jobs. Just enqueue a job and processing will instantly begin - no need to wait for the pollInterval.
  • Easy JobFilters: JobRunr has the concept of JobFilters to easily extend the functionality of JobRunr. In JobRunr Pro, this becomes even easier as any Spring / Micronaut / Quarkus bean that implements the JobClientFilter or JobServerFilter will automatically be registered in JobRunr.
  • Improved serverTags: JobRunr Pro uses ServerTags to specify on which server a Job can run. From now on, you can even limit to run a job on the same server that scheduled it using the annotation @Job(runOnServerWithTag = "%CURRENT_SERVER")
  • enqueueOrReplace and scheduleOrReplace: are you creating jobs with your own UUID? By default, JobRunr ignores any new job that is enqueued or scheduled if it was already created before as it allows to process jobs in a cluster only once. But do you need to replace that job for some reason? Using the new enqueueOrReplace and scheduleOrReplace methods it is now possible to update existing jobs at any point in the lifecycle of that job.
  • Job Results: do you want to return the result from your job to a client? JobRunr Pro now captures the result of a job, serializes it to JSON and saves it to the database. Using the JobScheduler, you can then query for the result of a job. It comes with a smart query algorithm that takes into account average processing time of that type of job and it makes sure that you don't overload the database if you for example have clients querying for the result in a while loop.
  • Dashboard improvements: the JobRunr Pro dashboard has improved a lot! You can now requeue or delete all failed jobs at once. A real time-saver.

Breaking changes:

  • all existing recurring jobs are not compatible anymore due to the support for recurring jobs using an interval. Please make sure to have no recurring jobs nor scheduled jobs in your application before upgrading.
  • the job metadata is now cleared as soon as the job succeeded. There are 2 reasons for this: storage savings in your storage provider and the fact that it was used to return results from jobs without any back-off policy and thus negatively impacting the performance of JobRunr. But, JobRunr Pro now supports returning results from jobs!
  • if you are using ElasticSearch, you will need to update your ElasticSearch dependencies as a bug was introduced by Elastic in ElasticSearch 7.16
  • all dependencies have been updated to the latest version - make sure to upgrade your dependencies too.

👏 Special thanks to ...

Daniela Tumbraegel, ShawnNest for the PR's and Josh Long fun pairing session to add support for Spring Boot Native - the Spring guys are really amazing! I also want to thank Pei-Tang and Jan Holger for sponsoring me and making sure I have enough caffein!

All improvements & bugfixes

jobrunr - v4.0.10

Published by rdehuyss over 2 years ago

New features

None

Bugfixes

  • Fix #375 : Fails to deserialize JobDetails from Enum with abstract member
  • Fix #362: CronExpression cannot handle December 30th and 31st
jobrunr - v4.0.9

Published by rdehuyss over 2 years ago

New Features

  • PR #354 : add static method for creating AmazonDocumentDBStorageProvider as a default settings

Bugfixes

  • Fix #360 : Inconsistencies of CRON expression parsing for yearly scheduled jobs
jobrunr - v4.0.8

Published by rdehuyss over 2 years ago

New Features

  • No new features

Bugfixes

  • Fix #347: Oracle DB - Fix column size Metadata table
jobrunr - v4.0.7

Published by rdehuyss over 2 years ago

New Features

  • No new features

Bugfixes

  • Fix #335: CachingJobDetailsGenerator - Jobs are scheduled with the same parameters even though different parameters are provided
  • Fix #325: Support for Korean and other languages for Dashboard logging
jobrunr - v4.0.6

Published by rdehuyss almost 3 years ago

New Features

  • No new features

Bugfixes

  • Fix #282: Failure serializing singletonSet
  • Fix #296: Support latest version of H2 Database
  • Fix #302: Example of Cron using seconds

Other

  • Version upgrades of dependencies
jobrunr - v4.0.5

Published by rdehuyss almost 3 years ago

New Features

  • Initial support for Spring Native

Bugfixes

None

jobrunr - v4.0.4

Published by rdehuyss almost 3 years ago

New Features

  • None

Bugfixes

  • #272 Background Job Servers shows duplicated servers
  • #275 MySQL DB deadlock when updating jobrunr_backgroundjobservers
jobrunr - v4.0.3

Published by rdehuyss almost 3 years ago

New Features

  • #258 Consider supporting Kotlin 1.6
  • Allow to set the ConcurrentJobModificationPolicy (Beta, use on your own risk)

Bugfixes

  • small improvements to have less ConcurrentJobModificationExceptions
jobrunr - v4.0.2

Published by rdehuyss almost 3 years ago

New Features

None

Bugfixes

  • #255 [BUG] gson 2.8.8+ support
  • #254 [BUG] Unable to deserialize older job parameters
  • #252 [BUG] NoSuchFieldError org.jobrunr.utils.mapper.gson.GsonJsonMapper in fixGsonNotBeingExtensible
  • #230 [BUG] Upgrade from 3.2.1 to 4.0.0 causes FlywayException by using PostgreSQL
jobrunr - v4.0.1

Published by rdehuyss almost 3 years ago

New features

Bugfixes

jobrunr - v4.0.0

Published by rdehuyss about 3 years ago

Celebration time!

I'm pleased to announce the release of JobRunr v4.0.0 (which is now available via Maven Central) and JobRunr Pro v4.0.0 which is available for customers with a subscription. As this is a major release, there are also some small breaking changes.

Some great new features!

JobRunr

This release adds a ton of new improvements to JobRunr:

  • Job Analysis Performance mode: when a job is analyzed for the first time, JobRunr checks whether it can be cached. If so, all subsequent calls will be a lot faster. If job is not cacheable this is displayed in the dashboard.
  • JobRequest and JobRequestHandler: this release introduces the JobRequestScheduler a new way to create jobs using objects instead of lambda's. Read all about it in the updated documentation section.
  • Static method support: JobRunr can now create jobs using lambda's referencing static methods.
  • Updated JobRunr Spring Boot Starter with:
    • Support for @Recurring annotation for Recurring jobs
    • Support for disabled Recurring jobs using "-"
    • Support for multiple datasources in Spring (a specific datasource for JobRunr)
    • Support for Spring Actuator Health Endpoint
    • Support for Spring Actuator Metrics Endpoint
  • New Micronaut Integration with:
    • Support for @Recurring annotation for Recurring jobs
    • Support for disabled Recurring jobs using "-"
    • Support for multiple datasources in Micronaut (a specific datasource for JobRunr)
    • Support for Micronaut Health Endpoint
    • Support for Micronaut Metrics Endpoint
  • New Quarkus Extension with:
    • Support for @Recurring annotation for Recurring jobs
    • Support for disabled Recurring jobs using "-"
    • Support for multiple datasources in Quarkus (a specific datasource for JobRunr)
    • Support for Quarkus Health Endpoint
    • Support for Quarkus Metrics Endpoint
  • CPU Allocation Irregularities detection: as JobRunr uses NTP (network time protocol) and timeouts to detect if a BackgroundJobServer is still alive, it is important that the JVM does not stop too long. JVM's can stop due to full garbage collection taking too long or if they are running on shared cloud hardware where resources are stealed by other processes. JobRunr now detects this and shows a warning in the dashboard as it can impact the cluster.

JobRunr Pro

JobRunr Pro also received a lot of new features!

  • Pause Recurring Jobs: you can now pause recurring jobs with a click from the dashboard. Later on, you can easily resume these recurring jobs.
  • Job Migrations: on start, JobRunr Pro checks if there are jobs that cannot be found anymore. If there are jobs that do not exist anymore in the current version of your application, you can choose to delete them or even update them (this comes in handy when you have a lot of scheduled jobs in the future that you can now easily migrate!). Read more about it in the documentation.
  • Database fault-tolerance: JobRunr by default stops processing jobs if the connection to the database is lost (see also why this happens in the FAQ). JobRunr Pro now is now fault-tolerant in this regard and automatically starts processing again the moment your database is back online.

Breaking changes:

  • the enum DatabaseOptions moved to StorageProviderUtils. You will need to adapt your import.
  • the pollIntervalInSeconds can not be smaller than 5 or else an exception will be thrown. This is to not generate too much load on your SQL or noSQL database (and I think 5 seconds is even too low to be honest)
  • StateChanges are now validated: this will impact people who are using ElectStateFilters and are changing states that are not valid (e.g. from FAILED to SUCCEEDED, from PROCESSING to PROCESSING). Make sure to (unit) test these ElectStateFilters against the latest Job class.
  • JobRunr.configure()....initialize() now returns a JobRunrConfigurationResult which contains the JobScheduler and the JobRequestScheduler. This is done to add support for scheduling jobs via Java 8 lambda's and via the JobRequest interface.
  • BackgroundJobServerConfiguration andWorkerCountPolicy(BackgroundJobServerWorkerPolicy backgroundJobServerWorkerPolicy) has been renamed to BackgroundJobServerConfiguration andBackgroundJobServerWorkerPolicy(BackgroundJobServerWorkerPolicy backgroundJobServerWorkerPolicy)
  • the JobContext.getMetadata() method now returns an unmodifiable Map. To add metadata, you should now use the JobContext.saveMetadata(String, Object) method

Code Quality

As always, I strive for clean code when I'm working on JobRunr (or any other project). That's why this release got some extra love and fixes related to SonarQube.

👏 Special thanks to ...

Pei-Tang, Neil, Federico, Kevin and Anatolijs for various pull requests and help with issues!

All improvements & bugfixes

jobrunr - v4.0.0-RC3

Published by rdehuyss about 3 years ago

Features

  • #219 Improvements related to NoSql storage providers and the configuration in Quarkus, Micronaut & Spring

Bugfix

  • #218 Fix race condition with logging and job serialization
jobrunr - v4.0.0-RC2

Published by rdehuyss about 3 years ago

Small improvements and a bugfix

jobrunr - v4.0.0-RC1

Published by rdehuyss about 3 years ago

This is release candidate 1 for v4.0.0, biggest release since v1.0.0.

It contains a lot of improvements... stay tuned!

needed to recreate the release due to publishing problems to Maven Central.

Draft of improvements and breaking changes

New features

  • Job Analysis Performance mode: when a job is analyzed for the first time, JobRunr checks whether it can be cached. If so, all subsequent calls will be a lot faster. If job is not cacheable this is displayed in the dashboard.
  • Updated Spring boot starter with
    • Support for @Recurring annotation for Recurring jobs
    • Support for disabled Recurring jobs using "-"
    • Support for multiple datasources in Spring (a specific datasource for JobRunr)
    • Support for Spring Actuator Health Endpoint
    • Support for Spring Actuator Metrics Endpoint
  • New Micronaut feature with
    • Support for @Recurring annotation for Recurring jobs
    • Support for disabled Recurring jobs using "-"
    • Support for multiple datasources in Micronaut (a specific datasource for JobRunr)
    • Support for Micronaut Health Endpoint
    • Support for Micronaut Metrics Endpoint
  • New Quarkus extension with
    • Support for @Recurring annotation for Recurring jobs
    • Support for disabled Recurring jobs using "-"
    • Support for multiple datasources in Quarkus (a specific datasource for JobRunr)
    • Support for Quarkus Health Endpoint
    • Support for Quarkus Metrics Endpoint
  • CPU Allocation Irregularities detection: as JobRunr uses NTP and timeouts to detect if a BackgroundJobServer is still alive, it is important that the JVM does not stop too long. JVM's can stop due to full garbage collection taking too long or if they are running on shared cloud hardware where resources are stealed by other processes. JobRunr now detects this and shows a warning in the dashboard as it can impact the cluster.
  • JobRequest and JobRequestHandler: this release introduces the JobRequestScheduler a new way to create jobs using objects instead of lambda's.
  • Static method support: JobRunr can now create jobs using lambda's referencing static method

Breaking changes:

  • the pollIntervalInSeconds can not be smaller than 5 or else an exception will be thrown
  • StateChanges are now validated. This will impact people who are using ElectStateFilters and are changing states that are not valid (e.g. from Failed to Succeeded, from Processing to Processing).
  • JobRunr.configure()....initialize() now returns a JobRunrConfigurationResult which contains the JobScheduler and the JobRequestScheduler
  • BackgroundJobServerConfiguration andWorkerCountPolicy(BackgroundJobServerWorkerPolicy backgroundJobServerWorkerPolicy) has been renamed to BackgroundJobServerConfiguration andBackgroundJobServerWorkerPolicy(BackgroundJobServerWorkerPolicy backgroundJobServerWorkerPolicy)