2
votes

I am trying to create multiple instance of application on same marklogic environment. I can able to create all the configurations(users,roles,databases,forests,app servers...) but could not able to schedule individual tasks for separate database with same module path.

When tried to run ml-gradle mldeployApps failing at Tasks creation.

My whole application configuration will depends on from property file. for any APP-NAME a seperate insiance need to be created.

I tried deploying through ml-gradle The mlDeployTasks is failing as already an task is available for the module path. When try to run secong with new failing as it is not recognizing task database

JSON:

      {
         "task-enabled":true,
         "task-path":"/ext/schedules/monitor.xqy",
         "task-root":"/",
         "task-type":"daily",
         "task-period":1,
         "task-start-time": "10:00:00",
         "task-database":"%%DATABASE%%",
         "task-modules":"%%MODULES_DATABASE%%",
         "task-user":"admin",
         "task-priority":"normal"
       }

ERROR:

Logging HTTP response body to assist with debugging: {"errorResponse":{"statusCode":"500", "status":"Internal Server Error", "messageCode":"MANAGE-INVALID", "message":"MANAGE-INVALID (err:FOER0000): task-database"}} Error occurred while sending PUT request to /manage/v2/tasks/5389046897270663947/properties?group-id=Default; logging request body to assist with debugging: {

Expectation :

wants to deploy and undeploy whole application including schedules tasks based on APPLICATION-NAME as seperate instance

Actual:

the mlDeployTasks based on the module-path each task is identified with old existing database and fails to create a new task server.

Please suggest me the right way to achieve the same

2
Was this ever resolved? Looking for some direction. - Beez

2 Answers

1
votes

MarkLogic's Management API is seeing your request as an attempt to change the task-database, but it only allows one property for a scheduled task to change (task-enabled). I think what you'll need to do here is have different task-path values for your different databases. That's not ideal, but if the implementation logic is all in a library that's imported by the task, the different modules themselves will be very lightweight.

1
votes

Try ml-gradle 3.10.0 - support for this now exists - see the release notes for ml-app-deployer 3.10.0 (which provides most of the functionality in ml-gradle) - https://github.com/marklogic-community/ml-app-deployer/releases/tag/3.10.0