Hi, > [...] we have not been able to find a way, using either CLI or REST, to find > out when the task has completed. > Can someone tell me how, using either the CLI or REST API (or even the Mysql > database), we can determine that?
curl -X GET "http://host:port/syncope/rest/tasks/SCHEDULED/XXX?details=true" -H "Accept: application/json" where XXX is the task key; replace SCHEDULED with PULL for Pull Tasks and with PUSH for Push Tasks. The returned payload will contain an "executions" array where you can inspect the completed executions of the given task, e.g. if XXX was completed, and with which results. Please note that, for Propagation, Push and Pull, executions will be stored only when appropriate trace levels were set on the associated External Resource - see [1]. I wouldn't suggest playing too much with Quartz settings in Syncope, but if you really want to do so, the Quartz configuration is defined in [2]. All jobs defined implement [3] hence feature Quartz's [4] and [5]. FYI, when in need to orchestrate more Sched / Pull / Push tasks, I normally define an additional Sched task for such a purpose which triggers the others, and finally run / schedule this last one. Regards. [1] http://syncope.apache.org/docs/2.1/reference-guide.html#external-resource-details [2] https://github.com/apache/syncope/blob/2_1_X/core/provisioning-java/src/main/resources/provisioningContext.xml#L69-L99 [3] https://github.com/apache/syncope/blob/2_1_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/AbstractInterruptableJob.java [4] http://www.quartz-scheduler.org/api/2.3.0/org/quartz/InterruptableJob.html [5] http://www.quartz-scheduler.org/api/2.3.0/org/quartz/DisallowConcurrentExecution.html On 18/01/20 03:41, [email protected] wrote: > Hi, > > Another thought that I had, if Syncope uses Quartz is: Would it be possible > to configure Quartz to a single thread at-a-time, and iw we could do that, > would that prevent more than one Syncope tasks at-a-time? > > Jim > > > > On Saturday, January 18, 2020, 2:32:20 AM UTC, [email protected] > <[email protected]> wrote: > > > Hi, > > I've been digging around Syncope for the last several hours, trying to > understand and figure out we might get this working. We essentially want to > be able to have tasks run sequentially, whereas it seems like Syncope tasks > seem to run asynchronously (and, possibly, even in parallel?), and I noticed > some Quartz libraries, so I am wondering/guessing if Syncope uses Quartz for > executing tasks? > > If Syncope is using Quartz, would it be possible to use the > JobChainingJobListener that is mentioned in this thread: > > https://stackoverflow.com/questions/13486607/how-to-do-sequential-job-scheduling-quartz > > According to the 8/3/2015 post, that is available as part of Quartz scheduler. > > Thanks, > Jim > > > > > > On Friday, January 17, 2020, 8:37:06 PM UTC, [email protected] > <[email protected]> wrote: > > > Hi, > > We are running tasks using Syncope CLI and will be transitioning to using the > REST API, but meanwhile, for some of the sequences of tasks that we run, the > tasks within the sequence of tasks need to not be run until after the > previous task has completed (not just triggered, but actually completed), but > we have not been able to find a way, using either CLI or REST, to find out > when the task has completed. > > Can someone tell me how, using either the CLI or REST API (or even the Mysql > database), we can determine that? > > Thanks, > Jim -- Francesco Chicchiriccò Tirasa - Open Source Excellence http://www.tirasa.net/ Member at The Apache Software Foundation Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail http://home.apache.org/~ilgrosso/
