in-memory queues merged in to master

2 views
Skip to first unread message

Heather Piwowar

unread,
May 19, 2012, 1:06:10 AM5/19/12
to total-im...@googlegroups.com
Hey Kev, 

I was going to do some code that touched the backend so I decided to merge your stuff in before I started.  Success :)  it is in master now.  A few things:

- JASON: there are new views, so delete your ti db before running this new code so they are created
- the tests all pass, but one of them throws an exception before it passes.  I tried to look at it, but couldn't easily figure out the problem.  

test_14_backend (test.unit_tests.test_backend.TestBackend) ... Exception in thread Thread-15:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 522, in __bootstrap_inner
    self.run()
  File "/Users/hpiwowar/Documents/Projects/tiv2/total-impact-core/totalimpact/backend.py", line 150, in run
    item = self.dequeue()
  File "/Users/hpiwowar/Documents/Projects/tiv2/total-impact-core/totalimpact/backend.py", line 97, in dequeue
    item = self.queue.dequeue()
  File "/Users/hpiwowar/Documents/Projects/tiv2/total-impact-core/totalimpact/queue.py", line 207, in dequeue
    default_settings.PROVIDERS)
  File "/Users/hpiwowar/Documents/Projects/tiv2/total-impact-core/totalimpact/models.py", line 152, in get
    raise LookupError
LookupError
passed

 I think that's it.  For some reason the merge didn't make the threads show the branches merge nicely in my git gui... but the code is in there and it works!

It is faster I think.  It is still slower than I'd guess when we call it from the webapp though.  Might be because I'm printing out lots of debug, might be because we are doing lots of api calls, not sure yet.

Heather

Kevin Campbell

unread,
May 19, 2012, 1:43:34 AM5/19/12
to total-im...@googlegroups.com

Heather,

Are you running the system using the startup scripts?

larkspur:total-impact-core kev$ ./service/api start
Starting api server: Started
larkspur:total-impact-core kev$ ./service/backend start
Starting backend server: Started

Certainly for the API point of view, running it this way will be significantly faster.

K

Heather Piwowar

unread,
May 19, 2012, 9:06:34 AM5/19/12
to total-im...@googlegroups.com
Good to know, I'll try it using the startup scripts.  For my education, why would it be significantly faster that way?  Are daemons in general just significantly faster because they don't have to deal with the terminal?

Do you have any clues about the exception?

Thanks,
Heather

Kevin Campbell

unread,
May 19, 2012, 3:36:23 PM5/19/12
to total-im...@googlegroups.com
On Sat, May 19, 2012 at 2:06 PM, Heather Piwowar <hpiw...@gmail.com> wrote:
Good to know, I'll try it using the startup scripts.  For my education, why would it be significantly faster that way?  Are daemons in general just significantly faster because they don't have to deal with the terminal?

The API script uses gnuicorn, and spawns 4+ processes for the API. Backend won't be massively affected.
 
Do you have any clues about the exception?

I'll check out first thing tomorrow.

K
Reply all
Reply to author
Forward
0 new messages