예제 #1
0
        protected override void OnItemSucceeded(WorkQueueItem item)
        {
            // this method is overridden because image availability work items are never considered complete until they expire

            Procedure procedure    = ImageAvailabilityWorkQueue.GetProcedure(item, PersistenceScope.CurrentContext);
            DateTime  nextPollTime = Platform.Time.Add(GetPollingInterval(procedure.ImageAvailability));

            if (nextPollTime < item.ExpirationTime)
            {
                item.Reschedule(nextPollTime);
            }
            else
            {
                base.OnItemSucceeded(item);
            }
        }
예제 #2
0
        protected override void ActOnItem(WorkQueueItem item)
        {
            Procedure procedure = ImageAvailabilityWorkQueue.GetProcedure(item, PersistenceScope.CurrentContext);

            procedure.ImageAvailability = _imageAvailabilityStrategy.ComputeProcedureImageAvailability(procedure, PersistenceScope.CurrentContext);
        }