EGreg / Platform-history

The Qbix Platform for powering Social Applications
http://qbix.com/platform
GNU Affero General Public License v3.0
21 stars 5 forks source link

Implement Streams/task streams #47

Open EGreg opened 9 years ago

EGreg commented 9 years ago

It should look something like this

Streams.create({
    type: 'Streams/task'
}, function () {
    this.onUpdated('progress').set(function ({

    }, tool);
});

No need to implement extension classes without tables. Instead of $stream->Streams_Task->progress(0.5) We will just have this:

Streams_Task::progress($stream, 0.5);
$stream->setAttribute('progress', '0.5');
$stream->changed();

Maybe also post Streams/progress and Streams/completed messages, so others can subscribe to them? Or they can just subscribe to "Streams/changed" with a custom handler?

Streams