Skip to content

Commit

Permalink
Add - queue stop to kill off queues
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Oct 26, 2013
1 parent e8403b8 commit 614bf9c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
@@ -1,2 +1,2 @@
# Disable LF normalization for all files
* -text
* -text
Expand Up @@ -1636,20 +1636,20 @@ public void registerCoreMembers() {

// <--[command]
// @Name Queue
// @Usage queue (queue:<id>) [clear/pause/resume/delay:<#>]
// @Usage queue (queue:<id>) [clear/stop/pause/resume/delay:<#>]
// @Required 1
// @Stable stable
// @Short Modifies the current state of a script queue.
// @Author Todo
// @Description
// Todo
// @Tags
// Todo
// <queue. * >
// @Usage
// Todo
// -->
registerCoreMember(QueueCommand.class,
"QUEUE", "queue (queue:<id>) [clear/pause/resume/delay:<#>]", 1);
"QUEUE", "queue (queue:<id>) [clear/stop/pause/resume/delay:<#>]", 1);


// <--[command]
Expand Down
Expand Up @@ -13,7 +13,7 @@

public class QueueCommand extends AbstractCommand {

private enum Action { CLEAR, DELAY, PAUSE, RESUME }
private enum Action { CLEAR, DELAY, PAUSE, RESUME, STOP }

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
Expand Down Expand Up @@ -60,14 +60,18 @@ public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {
// Debugger
dB.report(getName(), aH.debugObj("Queue", queue.id)
+ aH.debugObj("Action", action.toString())
+ (action != null && action == Action.DELAY ? delay.debug() : ""));
+ (action == Action.DELAY ? delay.debug() : ""));

switch (action) {

case CLEAR:
queue.clear();
return;

case STOP:
queue.stop();
return;

case PAUSE:
if (queue instanceof TimedQueue)
((TimedQueue) queue).setPaused(true);
Expand Down

0 comments on commit 614bf9c

Please sign in to comment.