Workqueue - implement round-robin processing

Algorithm description

Invocation

At the moment there’s periodical timer with interval 10 second. This will be changed to the interval specified in origamSettings meaning the delay between the processing cycles. After processing cycle is finished, the delay interval should be started and at its end the new processing cycle should be invoked.

Processing Cycle

flowchart TD Start([Start]) --> GetList GetList(Get list of relevant work queues) --> ForEachQueue{For each queue} ForEachQueue --> |Next Queue| ProcessEntries(Process given number of entries - specified by origamSettings) ProcessEntries --> NoMoreEntries{No more entries in queue?} NoMoreEntries --> |true| MarkQueue(Mark queue as processed) MarkQueue --> ForEachQueue NoMoreEntries --> |false| ForEachQueue ForEachQueue --> |No Queue| AllQueuesProcessed{Are all queues marked as processed?} AllQueuesProcessed --> |false| ResetQueues(Reset queue flags) ResetQueues --> GetList AllQueuesProcessed --> |true| End([End])