Lucidworks Custom connector get last job time

57 Views Asked by At

Need to get last successful job runtime in custom java connector.

enter image description here

Is it possible to get Last run start value, or any other way to store and retrieve last job run time?

Tried to get last job time by accessing history api service. curl -u user:pass fusion-host:6764/api/jobs/datasource:movies-db/history

Is there any other way to get values from connector itself?

1

There are 1 best solutions below

1
Nate On

https://doc.lucidworks.com/fusion-server/4.0/reference/api/jobs-api.html#get-the-job-history-for-a-datasource

Based on these docs, the response should be similar to this. You would use startTime for last run start

[ {
  "resource" : "datasource:movies-db",
  "startTime" : "2017-05-17T21:01:46.743Z",
  "endTime" : "2017-05-17T21:02:05.720Z",
  "status" : "success"
}, {
  "resource" : "datasource:movies-db",
  "startTime" : "2017-05-17T20:58:10.503Z",
  "endTime" : "2017-05-17T20:58:42.020Z",
  "status" : "success"
} ]