Coder Social home page Coder Social logo

firecall's Issues

async.py stop thread doesn't die on exit

in the async file, there is this code for "stop":

def stop(self, timeout=0):
    self.stopwatch = Thread(target=self.__stopper, args=(timeout,)).start()

unfortunately, if you make your timeout VERY long, then even if you make call stop with a timeout of 0, that will stop the request thread but the first watch, with the very long timeout, will have an outstanding thread.

then, it's very hard to close the program. python won't exit with that thread hanging about.

here is one solution.

def stop(self, timeout=0):
    t = Thread(target=self.__stopper, args=(timeout,))
    t.daemon = True
    self.stopwatch = t.start() #Thread(target=self.__stopper, args=(timeout,)).start()

namely, you make the thread that's waiting to STOP the request thread actually watch for exit. this works, i tried it.

anyway, i'm open to other ideas.

Support for Server-Sent Events (EventSource)

Firebase REST endpoints support the EventSource / Server-Sent Events protocol.
from Firebase Docs

This will allow streaming of changes from a single location in the Firebase database.

While we have sort of implemented checking of changes using onChange(), use of these server-sent events is more efficient.

problem while using .get

when i run the script:

import firebasin

RootRef = firebasin.Firebase("https://xxx.firebaseio.com")
data = RootRef.get_sync("/xxx")
print data

i get this:

Traceback (most recent call last):
File "get.py", line 4, in
data = RootRef.get_sync("/xxx")
AttributeError: 'RootDataRef' object has no attribute 'get_sync'

i also tried with DataRef object instead of RootDataRed with the same luck

thanks in advance

Keep It Simple, Sheldon

This library should ensure a gentle (non-steep ๐Ÿ˜„) learning curve for the programmer. It should offer good documentation that can be followed through with ease.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.