Commit b366064f authored by Xiaowu Zhang's avatar Xiaowu Zhang

cancel time out job

parent ff3a4b69
......@@ -141,7 +141,8 @@
}).push(function(gadget) {
return gadget.createJio({
type: "indexeddb",
database: "test"
database: "test",
_unite: 5e6
});
}).push(function() {
var controlPanel = g.__element.getElementsByClassName("page")[0];
......
......@@ -80,7 +80,7 @@
function tmp() {
callback_promise = new RSVP.Queue().push(function() {
callback();
animationId = window.requestAnimationFrame(tmp);
return promiseRequestAnimation(callback);
}).push(undefined, function(error) {
canceller();
reject(error);
......@@ -160,17 +160,20 @@
g.size = result.data.size;
return g.displayThisTitle(options.action + " : " + result.data.title);
}).push(function() {
g.index = 1e6;
g.index = 2e6;
return g.jio_getAttachment({
_id: options.id,
_attachment: "enclosure",
_start: 0,
_end: 1e6
_end: 2e6
});
}).push(function(blob) {
g.sourceBuffer = g.mediaSource.addSourceBuffer("audio/mpeg;");
return jIO.util.readBlobAsArrayBuffer(blob).then(function(e) {
g.sourceBuffer.appendBuffer(new Uint8Array(e.target.result));
if (g.index >= g.size) {
g.mediaSource.endOfStream();
}
g.audio.play();
g.fin = true;
});
......
......@@ -1820,7 +1820,7 @@ function JIO(storage_spec, options) {
enableJobMaker(this, shared, options);
enableJobReference(this, shared, options);
enableJobRetry(this, shared, options);
enableJobTimeout(this, shared, options);
// enableJobTimeout(this, shared, options);
enableJobChecker(this, shared, options);
enableJobQueue(this, shared, options);
enableJobRecovery(this, shared, options);
......
......@@ -168,7 +168,8 @@
.push(function (gadget) {
return gadget.createJio(
{ "type" : "indexeddb",
"database" : "test"}
"database" : "test",
"_unite" : 5000000}
);
})
.push(function () {
......
......@@ -103,7 +103,7 @@
callback_promise = new RSVP.Queue()
.push(function () {
callback();
animationId = window.requestAnimationFrame(tmp);
return promiseRequestAnimation(callback);
})
.push(undefined, function (error) {
canceller();
......@@ -223,16 +223,19 @@
+ result.data.title);
})
.push(function () {
g.index = 1000000;
g.index = 2000000;
return g.jio_getAttachment({"_id" : options.id,
"_attachment" : "enclosure",
"_start": 0,
"_end": 1000000});
"_end": 2000000});
})
.push(function (blob) {
g.sourceBuffer = g.mediaSource.addSourceBuffer('audio/mpeg;');
return jIO.util.readBlobAsArrayBuffer(blob).then(function (e) {
g.sourceBuffer.appendBuffer(new Uint8Array(e.target.result));
if (g.index >= g.size) {
g.mediaSource.endOfStream();
}
g.audio.play();
g.fin = true;
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment