Skip to content

Commit

Permalink
Add same to repeat
Browse files Browse the repository at this point in the history
(Meant to put in this in the same commit, but I accidentally unchecked
it on the github client. Woops!)
  • Loading branch information
mcmonkey4eva committed Sep 3, 2013
1 parent 594835c commit 365f9cb
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -47,6 +47,8 @@ public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {
dB.report(getName(), qty.debug());

for (int incr = 0; incr < qty.asInt(); incr++) {
if (scriptEntry.getResidingQueue().getWasCleared())
return;
ArrayList<ScriptEntry> newEntries = (ArrayList<ScriptEntry>) new ArrayList<ScriptEntry>();
for (ScriptEntry entr: entries) {
try {
Expand All @@ -59,6 +61,7 @@ public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {
}
}
ScriptQueue queue = new InstantQueue(UUID.randomUUID().toString());
queue.addDefinition("parent_queue", scriptEntry.getResidingQueue().id);
scriptEntry.getResidingQueue().addDefinition("value", String.valueOf(incr + 1));
queue.addDefinition("value", String.valueOf(incr + 1));
queue.addEntries(newEntries);
Expand Down

0 comments on commit 365f9cb

Please sign in to comment.