← Back to team overview

dhis2-devs team mailing list archive

Re: scheduling in DHIS

 

Hi Lars

Any comments on this one?

Regards
Vanya

On Wed, Aug 17, 2016 at 12:44 PM, Vanya Seth <vanyas@xxxxxxxxxxxxxxxx>
wrote:

> Hi Lars
>
> We are looking at extending org.hisp.dhis.system.scheduling.Scheduler to
> also have the ability to return the ListenableFuture for a Runnable as
> well. This will help us or any dev in the future to check the status of the
> ongoing Runnables in the system and provide some user experience around it.
>
> Please let know if you are ok with us taking it up? As we want to fix a
> bug wherein the "sync now" button should not be clickable if the task is
> already running.
>
> Regards
> Vanya
>
>
> On Mon, Aug 8, 2016 at 9:26 AM, Aamer Mohammed <aamerm@xxxxxxxxxxxxxxxx>
> wrote:
>
>> Hi Lars/Morten,
>>
>> The scheduling page in DHIS 2.24 has ability to run tasks immediately in
>> below sections.
>>
>>    - Metadata Synchronization - Using 'Sync Now' button
>>    - SMS Scheduler - Using 'Run Now' button
>>
>> When the user clicks 'Sync Now' button, an asynchronous task is triggered
>> in the backend for metadata synchronization. The user can click the button
>> again before the synchronization task is even complete. We want to prevent
>> this as it can spawn multiple threads in the system all doing the same job
>> leading to race conditions in system.
>>
>> We can do the changes in SchedulingManager.executeTask so that it will
>> check the status of the previously submitted task. If it is not running
>> then it will start new task or otherwise not. These changes should be
>> applicable to any 'executeNow' type tasks in the system.
>>
>> Does DHIS2 already have such functionality available elsewhere in the
>> system? Any thoughts on this approach.
>>
>>
>> Thanks
>> Aamer.
>>
>
>
>
> --
> With Regards
> ThoughtWorks Technologies
> Hyderabad
>
> --Stay Hungry Stay Foolish!!
>



-- 
With Regards
ThoughtWorks Technologies
Hyderabad

--Stay Hungry Stay Foolish!!

Follow ups

References