new ProcessQueue()
- Source:
- Copyright:
- 2022 Ferran Recio
- 2022 Ferran Recio
- License:
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
A process queue manager.
Adding process to the queue will guarante process are executed in sequence.
Classes
Methods
(async) _continueProcessing()
Continue the queue processing if no current process is defined.
_currentProcessor() → {FileUploader}
Return the current file uploader.
Returns:
- Type
- FileUploader
_discardCurrent()
Discard the current process and execute the next one if any.
addError(processName, errorMessage)
Adds a new pending upload to the queue.
Parameters:
Name | Type | Description |
---|---|---|
processName |
String | the file info |
errorMessage |
String | the file processor |
addPending(processName, processor)
Adds a new pending upload to the queue.
Parameters:
Name | Type | Description |
---|---|---|
processName |
String | the process name |
processor |
function | the execution function |