clever-queue 0.3.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +111 -16
- package/dist/engine/index.d.ts +1 -1
- package/dist/engine/index.js +2 -2
- package/dist/engine/index.js.map +1 -1
- package/dist/helpers/errors.js +1 -1
- package/dist/helpers/errors.js.map +1 -1
- package/dist/queues/index.d.ts +1 -1
- package/dist/queues/index.js +13 -2
- package/dist/queues/index.js.map +1 -1
- package/dist/queues/interfaces.d.ts +1 -1
- package/dist/queues/interfaces.js +10 -2
- package/dist/queues/interfaces.js.map +1 -1
- package/dist/runners/index.d.ts +1 -1
- package/dist/runners/index.js +1 -1
- package/dist/runners/index.js.map +1 -1
- package/dist/tasks/index.d.ts +1 -1
- package/dist/tasks/index.js +2 -2
- package/dist/tasks/index.js.map +1 -1
- package/documentation/demo_1E_2Q_1R_8T_Weight.svg +1 -0
- package/documentation/demo_1E_2Q_2R_8T_ProrityRunner.svg +1 -0
- package/documentation/demo_1E_3Q_1R_12T_Priority.svg +1 -0
- package/examples/src/demo_1E_2Q_1R_8T_Weight.ts +40 -0
- package/examples/src/demo_1E_2Q_2R_8T_ProrityRunner.ts +41 -0
- package/examples/src/demo_1E_3Q_1R_12T_Priority.ts +45 -0
- package/examples/src/example00.ts +1 -1
- package/examples/src/helpers/animations.ts +2 -2
- package/examples/src/path-expression-matcher.d.ts +6 -0
- package/package.json +2 -2
- package/src/engine/index.ts +3 -3
- package/src/helpers/errors.ts +1 -1
- package/src/queues/index.ts +11 -3
- package/src/queues/interfaces.ts +16 -3
- package/src/runners/index.ts +2 -2
- package/src/tasks/index.ts +3 -3
- package/test/behavior/scheduler.mjs +124 -0
- package/test/issues/00008-error-contract.mjs +52 -0
- package/test/issues/00009-weight-semantics.mjs +54 -0
- package/test/issues/00010-lifecycle-semantics.mjs +101 -0
- package/test/issues/00012-wording-cleanup.mjs +30 -0
- package/test/miscellaneous/test.mjs +16 -9
- package/test/units/engine.mjs +2 -2
- package/test/units/queue.mjs +4 -4
- package/test/units/task.mjs +13 -12
package/README.md
CHANGED
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
4
|
|
|
5
|
-
Queuing system for promises that handle
|
|
5
|
+
Queuing system for promises that handle concurrent, throttling, distributing, weighting and prioritizing in a *clever* fashion ?
|
|
6
6
|
|
|
7
|
-
Zero
|
|
7
|
+
**Zero dependencies.**
|
|
8
8
|
|
|
9
9
|
## Features
|
|
10
10
|
|
|
11
|
-
- [X] Promises
|
|
12
|
-
- [X]
|
|
13
|
-
- [X] Priority
|
|
14
|
-
- [X] Weighted
|
|
11
|
+
- [X] Task Promises
|
|
12
|
+
- [X] [Distribution (multiple queues)](#queue-distribution)
|
|
13
|
+
- [X] [Priority queues](#queue-priorities)
|
|
14
|
+
- [X] [Weighted queues](#queue-weights)
|
|
15
|
+
- [X] [Concurrency (multiple runners)](#runners-concurrency)
|
|
16
|
+
- [X] [Priority runners](#runners-priority)
|
|
15
17
|
- [ ] Throttling
|
|
16
18
|
|
|
17
19
|
## Architecture - clever-queue implements 4 classes :
|
|
@@ -22,7 +24,7 @@ Zero dependancies.
|
|
|
22
24
|
- *queue* : It is in charge of keeping tasks in a deterministic order (FIFO : First In, First Out by default), waiting for an available runner. You must have at least one queue in an engine. You may instantiate as many queues you need and manage priorities and weights between queues.
|
|
23
25
|
|
|
24
26
|
```
|
|
25
|
-
import * as cleverQueue from "clever-queue"; // import the library - no
|
|
27
|
+
import * as cleverQueue from "clever-queue"; // import the library - no dependencies
|
|
26
28
|
|
|
27
29
|
const engine = cleverQueue.createEngine(); // create and start (by default) engine with a single best effort runner (by default)
|
|
28
30
|
const queue = engine.createQueue(); // create your first queue, with standard priority (by default) and default weight (by default)
|
|
@@ -40,34 +42,127 @@ const myAsyncTaskToExecute: cleverQueue.tasks.FunctionToExecute = async function
|
|
|
40
42
|
})();
|
|
41
43
|
```
|
|
42
44
|
|
|
43
|
-
##
|
|
45
|
+
## Behavior / Semantics
|
|
44
46
|
|
|
45
|
-
###
|
|
47
|
+
### Engine
|
|
46
48
|
|
|
49
|
+
#### Stop and shutdown behavior
|
|
50
|
+
|
|
51
|
+
`clever-queue` treats stopping as a transition that prevents new work from being accepted while allowing in-flight work to finish safely.
|
|
52
|
+
|
|
53
|
+
- `engine.stop()` stops every queue and runner in the engine
|
|
54
|
+
- queued-but-not-started tasks are rejected when their queue stops
|
|
55
|
+
- a runner that is already executing a task finishes that task, then exits without taking another one
|
|
56
|
+
- `queue.stop()` prevents any later `enqueue()` call from succeeding
|
|
57
|
+
|
|
58
|
+
This means stop is safe for shutdown, but it is not a drain operation: pending tasks are cancelled rather than silently left unresolved.
|
|
59
|
+
|
|
60
|
+
### Task
|
|
61
|
+
|
|
62
|
+
A task moves through these observable states:
|
|
63
|
+
|
|
64
|
+
- `initialiazing`: the task object has been created
|
|
65
|
+
- `queued`: the task has been accepted by a queue and is waiting for a runner
|
|
66
|
+
- `running`: a runner has started executing the task function
|
|
67
|
+
- `completed`: the task completed successfully
|
|
68
|
+
- `exception`: the task failed
|
|
69
|
+
|
|
70
|
+
### Task return and failure behavior
|
|
71
|
+
|
|
72
|
+
The promise returned by `queue.enqueue()` / `queue.createTaskAndEnqueue()` follows the task result:
|
|
73
|
+
|
|
74
|
+
- resolved task function => promise resolves with the task return value
|
|
75
|
+
- thrown `Error` => promise rejects with that same `Error`
|
|
76
|
+
- thrown non-`Error` value => promise rejects with `FunctionRaisedAnHundledException`
|
|
77
|
+
|
|
78
|
+
### Queue
|
|
79
|
+
|
|
80
|
+
#### Queuing
|
|
81
|
+
|
|
82
|
+
Deliver Tasks to runner(s) in a deterministic order (FIFO : First In, First Out by default)
|
|
83
|
+
|
|
84
|
+
[Example](https://gitlab.com/job-so/clever-queue/-/raw/v0/examples/src/demo_1E_1Q_1R_4T.ts) : One standard priority queue delivering tasks to a standard runner.
|
|
47
85
|
```
|
|
48
86
|
const engine = cleverQueue.createEngine();
|
|
49
87
|
const queueA = engine.createQueue();
|
|
50
88
|
```
|
|
51
|
-
|
|
52
89
|

|
|
53
90
|
|
|
54
|
-
|
|
91
|
+
#### Queue Distribution
|
|
55
92
|
|
|
93
|
+
Having Multiple Queues to handle fair distribution. With this, you can specialize a queue per requester or group of requester. An overload of one of them will not block others as queues will be served equally (by default, may be changes by priorities and weights features, described below)
|
|
94
|
+
|
|
95
|
+
[Example](https://gitlab.com/job-so/clever-queue/-/raw/v0/examples/src/demo_1E_2Q_1R_8T.ts) : 2 x Queues / 1 x Runner / 8 x Tasks
|
|
56
96
|
```
|
|
57
97
|
const engine = cleverQueue.createEngine();
|
|
58
|
-
engine.createRunner({ priority: cleverQueue.queues.Priorities.BestEffort });
|
|
59
98
|
const queueA = engine.createQueue();
|
|
99
|
+
const queueB = engine.createQueue();
|
|
100
|
+
```
|
|
101
|
+

|
|
102
|
+
|
|
103
|
+
#### Queue Priorities
|
|
104
|
+
|
|
105
|
+
Queues are checked from absolute priority `cleverQueue.queues.Priorities.Absolute: 255` to best-effort priority `cleverQueue.queues.Priorities.BestEffort: 0`
|
|
106
|
+
|
|
107
|
+
You may instanciate as many queue you wish, multiple queues may have the same prority.
|
|
108
|
+
|
|
109
|
+
A lower-priority queue does not get turns while a higher-priority queue still has waiting tasks.
|
|
110
|
+
|
|
111
|
+
[Example](https://gitlab.com/job-so/clever-queue/-/raw/v0/examples/src/demo_1E_3Q_1R_12T_Priority.ts) : 3 queues with different priorities
|
|
60
112
|
```
|
|
113
|
+
const engine = cleverQueue.createEngine({ autostart: false });
|
|
114
|
+
const queueA = engine.createQueue({ priority: cleverQueue.queues.Priorities.Absolute, weight: 1 }); // Absolute priority (255), will be served first
|
|
115
|
+
const queueB = engine.createQueue({ priority: 100, weight: 1 }); // Random priority (between 0 and 255), will be served after queueA
|
|
116
|
+
const queueC = engine.createQueue({ priority: cleverQueue.queues.Priorities.BestEffort, weight: 1 }); // Best effort priority (0), will be served last
|
|
117
|
+
```
|
|
118
|
+

|
|
119
|
+
|
|
120
|
+
#### Queue Weights
|
|
121
|
+
|
|
122
|
+
Weights apply only between queues of the same priority.
|
|
61
123
|
|
|
62
|
-
|
|
124
|
+
A queue with a higher weight receives proportionally more dequeue turns over time than a queue with a lower weight.
|
|
63
125
|
|
|
64
|
-
|
|
126
|
+
Queue weights define how often queues of the **same priority** are selected relative to each other.
|
|
65
127
|
|
|
128
|
+
- valid active weights are integers from `cleverQueue.queues.Weights.Lowest: 1` to `cleverQueue.queues.Weights.Highest: 255`
|
|
129
|
+
- larger weights receive proportionally more dequeue turns over time
|
|
130
|
+
|
|
131
|
+
[Example](https://gitlab.com/job-so/clever-queue/-/raw/v0/examples/src/demo_1E_2Q_1R_8T_Weight.ts) : two standard-priority queues with weights `2` and `1` will tend toward a `2:1` dequeue pattern while both stay non-empty.
|
|
132
|
+
```
|
|
133
|
+
const engine = cleverQueue.createEngine({ autostart: false });
|
|
134
|
+
const queueA = engine.createQueue({ priority: cleverQueue.queues.Priorities.Standard, weight: 2 }); // Same priority (128) as queueB, but higher weight (2 vs 1)
|
|
135
|
+
const queueB = engine.createQueue({ priority: cleverQueue.queues.Priorities.Standard, weight: 1 });
|
|
136
|
+
```
|
|
137
|
+

|
|
138
|
+
|
|
139
|
+
### Runners
|
|
140
|
+
|
|
141
|
+
Each runner executes one task at a time.
|
|
142
|
+
|
|
143
|
+
#### Runners Concurrency
|
|
144
|
+
|
|
145
|
+
Concurrency comes from creating multiple runners on the same engine.
|
|
146
|
+
|
|
147
|
+
[Example](https://gitlab.com/job-so/clever-queue/-/raw/v0/examples/src/demo_1E_1Q_2R_4T.ts) : two best effort runners (the first one is instantiate on engine instantiation).
|
|
66
148
|
```
|
|
67
149
|
const engine = cleverQueue.createEngine();
|
|
150
|
+
engine.createRunner({ priority: cleverQueue.queues.Priorities.BestEffort });
|
|
68
151
|
const queueA = engine.createQueue();
|
|
69
|
-
const queueB = engine.createQueue();
|
|
70
152
|
```
|
|
153
|
+

|
|
71
154
|
|
|
72
|
-
|
|
155
|
+
#### Runners Priority
|
|
156
|
+
|
|
157
|
+
Runner priority sets the lowest queue priority a runner is allowed to consume.
|
|
158
|
+
In this case, if a new high priority task is coming, and all runners are running lower priority task, a runner will remain available to immedialty run it.
|
|
73
159
|
|
|
160
|
+
[Example](https://gitlab.com/job-so/clever-queue/-/raw/v0/examples/src/demo_1E_2Q_2R_8T_ProrityRunner.ts) : First runner (auto created by engine) is a best effort runner (Priority : 0), it will serve both QueueA (Absolute Prority : 255) and QueueB (Standard Prority 128). The second runner is configured to serve queues of priorites >= 255 (Absolute Priority), it will only serve QueueA.
|
|
161
|
+
```
|
|
162
|
+
const engine = cleverQueue.createEngine({ autostart: false }); // create the engine and the first runner with best effort priority (0)
|
|
163
|
+
engine.createRunner({ priority: cleverQueue.queues.Priorities.Absolute }); // create a second runner with absolute priority (255)
|
|
164
|
+
const queueA = engine.createQueue({ priority: cleverQueue.queues.Priorities.Absolute, weight: 1 }); // Queue with absolute priority (255), will be served first, by the 2 runners.
|
|
165
|
+
const queueB = engine.createQueue({ priority: cleverQueue.queues.Priorities.Standard, weight: 1 }); // Queue with standard priority (128), only by the first runner.
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+

|
package/dist/engine/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as cqQueue from "../queues";
|
|
2
2
|
import * as cqRunner from "../runners";
|
|
3
3
|
import * as cqTask from "../tasks";
|
|
4
|
-
type Status = "unknown" | "
|
|
4
|
+
type Status = "unknown" | "initializing" | "running" | "stopping" | "destroying";
|
|
5
5
|
import { Options, Statistics } from "./interfaces";
|
|
6
6
|
declare class Engine {
|
|
7
7
|
#private;
|
package/dist/engine/index.js
CHANGED
|
@@ -53,7 +53,7 @@ class Engine {
|
|
|
53
53
|
runners = [];
|
|
54
54
|
queues = [];
|
|
55
55
|
constructor(opt) {
|
|
56
|
-
this.status = "
|
|
56
|
+
this.status = "initializing";
|
|
57
57
|
this.options = { ...defaultOptions, ...opt };
|
|
58
58
|
if (!this.options.id)
|
|
59
59
|
this.options.id = _.Id.generate();
|
|
@@ -140,7 +140,7 @@ class Engine {
|
|
|
140
140
|
// Find Next Weighted Queue of this priority level to check
|
|
141
141
|
const nextPriorityQueue = this.#getNextWeightedQueue(priority);
|
|
142
142
|
if (nextPriorityQueue) {
|
|
143
|
-
// update Tick (next check) according to queue related
|
|
143
|
+
// update Tick (next check) according to queue related weight
|
|
144
144
|
nextPriorityQueue.tick += this.#getSumWeightFunction(priority) / nextPriorityQueue.options.weight;
|
|
145
145
|
// If queue is not empty, we've got our next Task to process
|
|
146
146
|
if (nextPriorityQueue.tasks.length > 0) {
|
package/dist/engine/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/engine/index.ts"],"names":[],"mappings":";AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEf,8CAAgC;AAChC,mDAAqC;AACrC,qDAAuC;AACvC,iDAAmC;AAInC,MAAM,UAAU,GAAG,EAAE,CAAC,CAAC,4CAA4C;AAEnE,6CAA+D;AAE/D,MAAM,cAAc,GAAY;IAC9B,iBAAiB,EAAE,CAAC;IACpB,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,SAAS;CACvB,CAAC;AAEF,MAAM,MAAM;IACV,MAAM,GAAW,SAAS,CAAC;IAClB,OAAO,CAAU;IAC1B,IAAI,GAAiD,EAAE,CAAC;IAC/C,OAAO,GAAsB,EAAE,CAAC;IAChC,MAAM,GAAoB,EAAE,CAAC;IAEtC,YAAY,GAAY;QACtB,IAAI,CAAC,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/engine/index.ts"],"names":[],"mappings":";AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEf,8CAAgC;AAChC,mDAAqC;AACrC,qDAAuC;AACvC,iDAAmC;AAInC,MAA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,SAAS,GAAG,CAAC,CAAC;QAClB,MAAM,OAAO,GAA0B,EAAE,CAAC;QAC1C,MAAM,MAAM,GAAyB,EAAE,CAAC;QACxC,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YAClC,IAAI,MAAM,CAAC,MAAM,IAAI,SAAS;gBAAE,SAAS,IAAI,CAAC,CAAC;YAC/C,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;QACpC,CAAC;QACD,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChC,SAAS,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;YAChC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;QAClC,CAAC;QACD,MAAM,IAAI,GAAe;YACvB,MAAM,EAAE;gBACN,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM;gBAC5B,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;gBAC1B,KAAK,EAAE,SAAS;aACjB;YACD,OAAO;YACP,MAAM;SACP,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAGQ,wBAAM;AADf,2CAA4E;AAA9C,wGAAA,UAAU,OAAA"}
|
package/dist/helpers/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/helpers/errors.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAQ,SAAQ,KAAK;IACzB,YAAY,KAAwC,EAAE,OAAgB;QACpE,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,KAAK,GAAG;gBACN,IAAI,EAAE,mBAAmB;gBACzB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/helpers/errors.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAQ,SAAQ,KAAK;IACzB,YAAY,KAAwC,EAAE,OAAgB;QACpE,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,KAAK,GAAG;gBACN,IAAI,EAAE,mBAAmB;gBACzB,OAAO,EAAE,yDAAyD;aACnE,CAAC;QACJ,CAAC;QACD,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC7B,IAAI,OAAO;YAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;CACF;AAEQ,0BAAO"}
|
package/dist/queues/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as cqTask from "../tasks";
|
|
2
2
|
import { Options, Statistics } from "./interfaces";
|
|
3
3
|
type GetSumWeightFunction = (priority: number) => number;
|
|
4
|
-
type Status = "unknown" | "
|
|
4
|
+
type Status = "unknown" | "initializing" | "running" | "stopping" | "destroying";
|
|
5
5
|
declare class Queue {
|
|
6
6
|
#private;
|
|
7
7
|
status: Status;
|
package/dist/queues/index.js
CHANGED
|
@@ -51,7 +51,7 @@ class Queue {
|
|
|
51
51
|
tick = 0;
|
|
52
52
|
tasks = [];
|
|
53
53
|
constructor(opt) {
|
|
54
|
-
this.status = "
|
|
54
|
+
this.status = "initializing";
|
|
55
55
|
this.options = this.#checkOptionsConsistancy({ ...defaultOptions, ...opt });
|
|
56
56
|
if (!this.options.id)
|
|
57
57
|
this.options.id = _.Id.generate();
|
|
@@ -61,7 +61,7 @@ class Queue {
|
|
|
61
61
|
#checkOptionsConsistancy(options) {
|
|
62
62
|
if (!options)
|
|
63
63
|
throw new _.Errors.CQError(interfaces_1.ErrorsList.NoOptionsOnQueueInitialization);
|
|
64
|
-
if (!(typeof options.priority === "number") || options.priority <
|
|
64
|
+
if (!(typeof options.priority === "number") || options.priority < interfaces_1.Priorities.BestEffort || options.priority > interfaces_1.Priorities.Absolute)
|
|
65
65
|
throw new _.Errors.CQError(interfaces_1.ErrorsList.BadPriorityOptionsOnQueueInitialization, options);
|
|
66
66
|
if (!(typeof options.weight === "number") || options.weight < interfaces_1.Weights.Lowest || options.weight > interfaces_1.Weights.Highest)
|
|
67
67
|
throw new _.Errors.CQError(interfaces_1.ErrorsList.NoWeightOptionsOnQueueInitialization, options);
|
|
@@ -71,13 +71,24 @@ class Queue {
|
|
|
71
71
|
this.status = "running";
|
|
72
72
|
}
|
|
73
73
|
stop() {
|
|
74
|
+
if (this.status === "stopping")
|
|
75
|
+
return;
|
|
74
76
|
this.status = "stopping";
|
|
77
|
+
while (this.tasks.length > 0) {
|
|
78
|
+
const task = this.tasks.shift();
|
|
79
|
+
if (task)
|
|
80
|
+
task.rejecter(new _.Errors.CQError(interfaces_1.ErrorsList.QueueIsStopping));
|
|
81
|
+
}
|
|
75
82
|
}
|
|
76
83
|
async createTaskAndEnqueue(function_, options = {}) {
|
|
77
84
|
const task = new cqTask.Task(function_, options);
|
|
78
85
|
return this.enqueue(task);
|
|
79
86
|
}
|
|
80
87
|
async enqueue(task) {
|
|
88
|
+
if (this.status === "stopping")
|
|
89
|
+
throw new _.Errors.CQError(interfaces_1.ErrorsList.QueueIsStopping);
|
|
90
|
+
if (this.status !== "running")
|
|
91
|
+
throw new _.Errors.CQError(interfaces_1.ErrorsList.QueueIsNotRunning);
|
|
81
92
|
task.status = "queued";
|
|
82
93
|
task.queueId = this.options.id; // store queue that handle task for future references
|
|
83
94
|
return new Promise((resolve, reject) => {
|
package/dist/queues/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/queues/index.ts"],"names":[],"mappings":";AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEf,8CAAgC;AAChC,iDAAmC;AACnC,6CAAoF;AAMpF,MA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
22
|
weight: number;
|
|
23
23
|
tasks: number;
|
|
24
24
|
}
|
|
25
|
-
type ErrorListKeys = "BadPriorityOptionsOnQueueInitialization" | "NoWeightOptionsOnQueueInitialization" | "NoOptionsOnQueueInitialization";
|
|
25
|
+
type ErrorListKeys = "BadPriorityOptionsOnQueueInitialization" | "NoWeightOptionsOnQueueInitialization" | "NoOptionsOnQueueInitialization" | "QueueIsStopping" | "QueueIsNotRunning";
|
|
26
26
|
declare const ErrorsList: {
|
|
27
27
|
[index in ErrorListKeys]: {
|
|
28
28
|
name: string;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Weights = exports.Priorities = exports.ErrorsList = void 0;
|
|
4
4
|
const Priorities = { BestEffort: 0, Standard: 128, Absolute: 255 };
|
|
5
5
|
exports.Priorities = Priorities;
|
|
6
|
-
const Weights = { Lowest:
|
|
6
|
+
const Weights = { Lowest: 1, Default: 128, Highest: 255 };
|
|
7
7
|
exports.Weights = Weights;
|
|
8
8
|
const ErrorsList = {
|
|
9
9
|
BadPriorityOptionsOnQueueInitialization: {
|
|
@@ -12,9 +12,17 @@ const ErrorsList = {
|
|
|
12
12
|
},
|
|
13
13
|
NoWeightOptionsOnQueueInitialization: {
|
|
14
14
|
name: "NoWeightOptionsOnQueueInitialization",
|
|
15
|
-
message: "You must provide a 'weight' parameter for Queue initialization from
|
|
15
|
+
message: "You must provide a 'weight' parameter for Queue initialization from 1 to 255, you may use CleverQueue.Weights constants",
|
|
16
16
|
},
|
|
17
17
|
NoOptionsOnQueueInitialization: { name: "NoOptionsOnQueueInitialization", message: "You must provide an options parameter to Queue" },
|
|
18
|
+
QueueIsStopping: {
|
|
19
|
+
name: "QueueIsStopping",
|
|
20
|
+
message: "Queue is stopping and can no longer accept new tasks",
|
|
21
|
+
},
|
|
22
|
+
QueueIsNotRunning: {
|
|
23
|
+
name: "QueueIsNotRunning",
|
|
24
|
+
message: "Queue must be running before tasks can be enqueued",
|
|
25
|
+
},
|
|
18
26
|
};
|
|
19
27
|
exports.ErrorsList = ErrorsList;
|
|
20
28
|
//# sourceMappingURL=interfaces.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/queues/interfaces.ts"],"names":[],"mappings":";;;AAEA,MAAM,UAAU,GAAG,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/queues/interfaces.ts"],"names":[],"mappings":";;;AAEA,MAAM,UAAU,GAAG,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC;AAiDzB,gCAAU;AAhDpD,MAAM,OAAO,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;AAgDJ,0BAAO;AAxB7D,MAAM,UAAU,GAEZ;IACF,uCAAuC,EAAE;QACvC,IAAI,EAAE,yCAAyC;QAC/C,OAAO,EACL,yKAAyK;KAC5K;IACD,oCAAoC,EAAE;QACpC,IAAI,EAAE,sCAAsC;QAC5C,OAAO,EAAE,yHAAyH;KACnI;IAED,8BAA8B,EAAE,EAAE,IAAI,EAAE,gCAAgC,EAAE,OAAO,EAAE,gDAAgD,EAAE;IACrI,eAAe,EAAE;QACf,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,sDAAsD;KAChE;IACD,iBAAiB,EAAE;QACjB,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,oDAAoD;KAC9D;CACF,CAAC;AAE4B,gCAAU"}
|
package/dist/runners/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options, Statistics } from "./interfaces";
|
|
2
2
|
import * as cqEngine from "../engine";
|
|
3
3
|
export * from "./interfaces";
|
|
4
|
-
type Status = "unknown" | "
|
|
4
|
+
type Status = "unknown" | "initializing" | "idle" | "running" | "stopping" | "destroying";
|
|
5
5
|
declare class Runner {
|
|
6
6
|
#private;
|
|
7
7
|
status: Status;
|
package/dist/runners/index.js
CHANGED
|
@@ -52,7 +52,7 @@ class Runner {
|
|
|
52
52
|
tags = {};
|
|
53
53
|
#engine;
|
|
54
54
|
constructor(opt, engine) {
|
|
55
|
-
this.status = "
|
|
55
|
+
this.status = "initializing";
|
|
56
56
|
this.options = this.#checkOptionsConsistancy({ ...defaultOptions, ...opt });
|
|
57
57
|
if (!this.options.id)
|
|
58
58
|
this.options.id = _.Id.generate();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/runners/index.ts"],"names":[],"mappings":";AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEf,8CAAgC;AAChC,6CAA2E;AAG3E,+CAA6B;AAI7B,MAAM,cAAc,GAAY;IAC9B,QAAQ,EAAE,uBAAU,CAAC,UAAU;IAC/B,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,SAAS;CACvB,CAAC;AAEF,MAAM,MAAM;IACV,MAAM,GAAW,SAAS,CAAC;IAClB,OAAO,CAAU;IAC1B,IAAI,GAAiD,EAAE,CAAC;IAC/C,OAAO,CAAkB;IAElC,YAAY,GAAY,EAAE,MAAuB;QAC/C,IAAI,CAAC,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/runners/index.ts"],"names":[],"mappings":";AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEf,8CAAgC;AAChC,6CAA2E;AAG3E,+CAA6B;AAI7B,MAAM,cAAc,GAAY;IAC9B,QAAQ,EAAE,uBAAU,CAAC,UAAU;IAC/B,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,SAAS;CACvB,CAAC;AAEF,MAA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AC;gBACpD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,sDAAsD;gBACvF,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC;gBACjB,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS;oBAAE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;YACtD,CAAC;QACH,CAAC;IACH,CAAC;IAED,KAAK;QACH,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;IAED,IAAI;QACF,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;IAC3B,CAAC;IAED,UAAU;QACR,MAAM,IAAI,GAAe;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ;SAChC,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAGQ,wBAAM;AADf,2CAA+D;AAAjC,wGAAA,UAAU,OAAA"}
|
package/dist/tasks/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Options, Statistics, FunctionToExecute } from "./interfaces";
|
|
2
|
-
type Status = "unknown" | "
|
|
2
|
+
type Status = "unknown" | "initializing" | "queued" | "running" | "completed" | "exception" | "destroying";
|
|
3
3
|
declare class Task {
|
|
4
4
|
#private;
|
|
5
5
|
status: Status;
|
package/dist/tasks/index.js
CHANGED
|
@@ -60,7 +60,7 @@ class Task {
|
|
|
60
60
|
throw new _.Errors.CQError(interfaces_1.ErrorsList.TaskRunnerNotInitialized);
|
|
61
61
|
}
|
|
62
62
|
constructor(function_, opt) {
|
|
63
|
-
this.status = "
|
|
63
|
+
this.status = "initializing";
|
|
64
64
|
this.options = this.#checkOptionsConsistancy({ ...defaultOptions, ...opt });
|
|
65
65
|
if (!this.options.id)
|
|
66
66
|
this.options.id = _.Id.generate();
|
|
@@ -73,7 +73,7 @@ class Task {
|
|
|
73
73
|
this.status = "running";
|
|
74
74
|
try {
|
|
75
75
|
this.result = await this.#functionToExecute();
|
|
76
|
-
this.status = "
|
|
76
|
+
this.status = "completed";
|
|
77
77
|
this.resolver(this.result);
|
|
78
78
|
}
|
|
79
79
|
catch (error) {
|
package/dist/tasks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tasks/index.ts"],"names":[],"mappings":";AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEf,8CAAgC;AAChC,6CAAkF;AAIlF,MAAM,cAAc,GAAY;IAC9B,WAAW,EAAE,SAAS;CACvB,CAAC;AAEF,MAAM,IAAI;IACR,MAAM,GAAW,SAAS,CAAC;IAClB,OAAO,CAAU;IAC1B,IAAI,GAAiD,EAAE,CAAC;IACxD,OAAO,CAAqB;IAC5B,QAAQ,CAAqB;IAE7B,kBAAkB,CAAoB;IACtC,MAAM,GAAwB,SAAS,CAAC;IAC/B,GAAG,CAAyB;IAErC,8DAA8D;IAC9D,QAAQ,CAA0C;IAClD,8DAA8D;IAC9D,QAAQ,CAAyB;IAEjC,gBAAgB;QACd,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,uBAAU,CAAC,wBAAwB,CAAC,CAAC;IAClE,CAAC;IACD,gBAAgB;QACd,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,uBAAU,CAAC,wBAAwB,CAAC,CAAC;IAClE,CAAC;IAED,YAAY,SAA4B,EAAE,GAAY;QACpD,IAAI,CAAC,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tasks/index.ts"],"names":[],"mappings":";AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEf,8CAAgC;AAChC,6CAAkF;AAIlF,MAAM,cAAc,GAAY;IAC9B,WAAW,EAAE,SAAS;CACvB,CAAC;AAEF,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CAAC,MAAM,GAAG,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAC;gBAC9C,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC;gBAC1B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC7B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC;gBAC1B,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;oBAC3B,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;gBACvB,CAAC;qBAAM,CAAC;oBACN,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,uBAAU,CAAC,gCAAgC,CAAC,CAAC,CAAC;gBACnF,CAAC;YACH,CAAC;QACH,CAAC,CAAC;IACJ,CAAC;IAED,wBAAwB,CAAC,OAAgB;QACvC,IAAI,CAAC,OAAO;YAAE,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,uBAAU,CAAC,6BAA6B,CAAC,CAAC;QACnF,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,UAAU;QACR,MAAM,IAAI,GAAe;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAGQ,oBAAI;AADb,2CAAkF;AAApD,wGAAA,UAAU,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="800"><g><rect x="10" y="10" width="10" height="10"></rect><animateMotion id="start" begin="stop.end;0" dur="2" path="M400,-800"></animateMotion></g><g id="13e3651c8c5"><g><rect x="200" y="100" width="100" height="350" rx="20" ry="20" fill="lightblue" stroke="blue" stroke-width="5"></rect></g></g><g id="290098b413"><g><rect x="500" y="100" width="100" height="350" rx="20" ry="20" fill="lightblue" stroke="blue" stroke-width="5"></rect></g></g><g id="3294fd7f6d"><g><rect x="350" y="610" width="100" height="100" rx="20" ry="20" fill="lightgreen" stroke="green" stroke-width="5"></rect></g></g><g id="task A1"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task A1</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L210,360"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M210,360 L360,620"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M360,620 L360,870"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+22s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+23s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+24s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+25s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+26s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task A2"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task A2</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L210,277"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M210,277 L210,277"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M210,277 L210,360"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M210,360 L360,620"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M360,620 L360,870"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+22s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+23s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+24s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+25s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+26s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task A3"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task A3</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L210,193"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M210,193 L210,193"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M210,193 L210,270"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M210,270 L210,270"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M210,270 L210,270"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M210,270 L210,360"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M210,360 L360,620"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M360,620 L360,870"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+22s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+23s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+24s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+25s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+26s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task A4"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task A4</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L210,110"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M210,110 L210,110"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M210,110 L210,180"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M210,180 L210,180"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M210,180 L210,180"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M210,180 L210,270"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M210,270 L210,270"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M210,270 L210,270"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M210,270 L210,270"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M210,270 L210,270"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M210,270 L210,360"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M210,360 L360,620"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M360,620 L360,870"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+22s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+23s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+24s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+25s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+26s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task B1"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task B1</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L510,360"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M510,360 L360,620"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M360,620 L360,870"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+22s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+23s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+24s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+25s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+26s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task B2"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task B2</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L510,277"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M510,277 L510,277"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M510,277 L510,277"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M510,277 L510,277"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M510,277 L510,277"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M510,277 L510,277"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M510,277 L510,277"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M510,277 L510,277"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M510,277 L510,360"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M510,360 L360,620"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M360,620 L360,870"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+22s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+23s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+24s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+25s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+26s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task B3"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task B3</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L510,193"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M510,193 L510,193"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M510,193 L510,193"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M510,193 L510,193"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M510,193 L510,193"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M510,193 L510,193"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M510,193 L510,193"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M510,193 L510,193"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M510,193 L510,270"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M510,270 L510,270"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M510,270 L510,270"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M510,270 L510,270"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M510,270 L510,270"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M510,270 L510,270"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M510,270 L510,270"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M510,270 L510,360"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M510,360 L360,620"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,620 L360,870"></animateMotion><animateMotion begin="start.end+22s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+23s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+24s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+25s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+26s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task B4"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task B4</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L510,110"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M510,110 L510,110"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M510,110 L510,110"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M510,110 L510,110"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M510,110 L510,110"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M510,110 L510,110"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M510,110 L510,110"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M510,110 L510,110"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M510,110 L510,180"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M510,180 L510,180"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M510,180 L510,180"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M510,180 L510,180"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M510,180 L510,180"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M510,180 L510,180"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M510,180 L510,180"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M510,180 L510,270"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M510,270 L510,270"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M510,270 L510,270"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M510,270 L510,360"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M510,360 L360,620"></animateMotion><animateMotion begin="start.end+22s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+23s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+24s" dur="1" path="M360,620 L360,870"></animateMotion><animateMotion begin="start.end+25s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+26s" dur="1" path="M360,870 L360,870"></animateMotion></g><g><rect x="10" y="10" width="10" height="10"></rect><animateMotion id="stop" begin="start.end + 26s" dur="2" path="M400,-800"></animateMotion></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="800"><g><rect x="10" y="10" width="10" height="10"></rect><animateMotion id="start" begin="stop.end;0" dur="2" path="M400,-800"></animateMotion></g><g id="7ab4f20e85"><g><rect x="200" y="100" width="100" height="350" rx="20" ry="20" fill="lightblue" stroke="blue" stroke-width="5"></rect></g></g><g id="156c7165d54"><g><rect x="500" y="100" width="100" height="350" rx="20" ry="20" fill="lightblue" stroke="blue" stroke-width="5"></rect></g></g><g id="13d4da03443"><g><rect x="200" y="610" width="100" height="100" rx="20" ry="20" fill="lightgreen" stroke="green" stroke-width="5"></rect></g></g><g id="150bb68ca24"><g><rect x="500" y="610" width="100" height="100" rx="20" ry="20" fill="lightgreen" stroke="green" stroke-width="5"></rect></g></g><g id="task A1"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task A1</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L210,360"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M210,360 L210,620"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M210,620 L210,620"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M210,620 L210,620"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M210,620 L360,870"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task A2"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task A2</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L210,277"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M210,277 L210,277"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M210,277 L510,620"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M510,620 L510,620"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M510,620 L510,620"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M510,620 L360,870"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task A3"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task A3</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L210,193"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M210,193 L210,193"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M210,193 L210,360"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M210,360 L210,620"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M210,620 L210,620"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M210,620 L210,620"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M210,620 L360,870"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task A4"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task A4</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L210,110"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M210,110 L210,110"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M210,110 L210,270"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M210,270 L210,270"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M210,270 L210,270"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M210,270 L510,620"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M510,620 L510,620"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M510,620 L510,620"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M510,620 L360,870"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task B1"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task B1</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L510,360"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M510,360 L210,620"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M210,620 L210,620"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M210,620 L360,870"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task B2"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task B2</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L510,277"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M510,277 L510,277"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M510,277 L510,277"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M510,277 L510,277"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M510,277 L510,277"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M510,277 L510,277"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M510,277 L510,277"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M510,277 L510,277"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M510,277 L510,360"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M510,360 L210,620"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M210,620 L210,620"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M210,620 L210,620"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M210,620 L360,870"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task B3"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task B3</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L510,193"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M510,193 L510,193"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M510,193 L510,193"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M510,193 L510,193"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M510,193 L510,193"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M510,193 L510,193"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M510,193 L510,193"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M510,193 L510,193"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M510,193 L510,270"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M510,270 L510,270"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M510,270 L510,360"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M510,360 L210,620"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M210,620 L210,620"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M210,620 L360,870"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task B4"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task B4</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L510,110"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M510,110 L510,110"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M510,110 L510,110"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M510,110 L510,110"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M510,110 L510,110"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M510,110 L510,110"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M510,110 L510,110"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M510,110 L510,110"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M510,110 L510,180"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M510,180 L510,180"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M510,180 L510,270"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M510,270 L510,270"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M510,270 L510,270"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M510,270 L510,360"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M510,360 L210,620"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M210,620 L210,620"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M210,620 L210,620"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M210,620 L360,870"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,870 L360,870"></animateMotion></g><g><rect x="10" y="10" width="10" height="10"></rect><animateMotion id="stop" begin="start.end + 21s" dur="2" path="M400,-800"></animateMotion></g></svg>
|