error "throwing" and polling

18 views
Skip to first unread message

Ádám Peresztegi

unread,
Nov 14, 2014, 12:13:20 AM11/14/14
to bac...@googlegroups.com
Hi,

TLDR - could someone help improving on these here? -> https://gist.github.com/flash42/4694896467562555d070


I've accumulated two problems after my first few days of writing async bacon.js code. 
  1. I've tried to find a good solution for adding "user" errors to an EventStream - and propagating it. All this because I wan't to handle the errors later possibly at multiple clients. I've found a hack with flatMap but it's ... a hack I feel. (see gist)
  2. I've implemented a polling logic checking the status of a RESTful service returning the status of a backend job. I've run into the problem of shutting down the polling and solved it with an "unsubBus". I'm wondering if this could be solved in a better way. (see gist)

Reply all
Reply to author
Forward
0 new messages