Checks for invalid ExecutionId in the TaskLifeCycleListener
resolves #115 * Fixes bug where if the user set the environment variable and commandline args a unique constraint would fire. * Updated docs * Removed deprecation * Fixed version number for integration test. Added integration tests for externally generated task executions Add externalExecutionId resolves #80
This commit is contained in:
@@ -49,7 +49,7 @@ updated in the repository with the results.
|
||||
|
||||
NOTE: At the completion of a task (all `*Runner#run` methods are called and the task
|
||||
repository has been updated) the `ApplicationContext` will be closed by default. This
|
||||
behavior can be overriden by setting the property `spring.cloud.task.closecontext.enable`
|
||||
behavior can be overriden by setting the property `spring.cloud.task.closecontext_enable`
|
||||
to false.
|
||||
|
||||
[[features-task-execution-details]]
|
||||
@@ -135,6 +135,39 @@ If your application utilizes more than one `DataSource`, you'll need to configur
|
||||
task repository with the appropriate `DataSource`. This customization can be done via an
|
||||
implementation of the `TaskConfigurer`.
|
||||
|
||||
[[features-generated_task_id]]
|
||||
=== Externally Generated Task Id
|
||||
|
||||
In some cases a user wants to allow for the time difference between
|
||||
when a task is requested and when the infrastructure actually launches it.
|
||||
Spring Cloud Task allows a user to create a TaskExecution at the time the
|
||||
task is requested. Then pass the execution ID of the generated TaskExecution
|
||||
to the task so that it can update the TaskExecution through the task's lifecycle.
|
||||
|
||||
The TaskExecution can be created by calling the `createTaskExecution` method on
|
||||
an implementation of the TaskRepository that references the datastore storing
|
||||
the TaskExecutions.
|
||||
|
||||
In order to configure your Task to use a generated TaskExecutionId add the
|
||||
following property:
|
||||
|
||||
```
|
||||
spring.cloud.task.executionid=<yourtaskId>
|
||||
```
|
||||
|
||||
[[features-external_task_id]]
|
||||
=== External Task Id
|
||||
|
||||
Spring Cloud Task allows a user to store an external task Id for each
|
||||
TaskExecution. An example of this would be a task id that is provided by
|
||||
Cloud Foundry when a task is launched on the platform.
|
||||
In order to configure your Task to use a generated TaskExecutionId add the
|
||||
following property:
|
||||
|
||||
```
|
||||
spring.cloud.task.external.executionid=<externalTaskId>
|
||||
```
|
||||
|
||||
[[features-task-configurer]]
|
||||
=== TaskConfigurer
|
||||
|
||||
|
||||
Reference in New Issue
Block a user