[wingide-users] Debugging django/celery

Mark Jones mark0978 at gmail.com
Thu Feb 28 12:11:51 EST 2013


Don't debug them both at the same time.   The whole print of Celery is to
separate things.  Refactor your celery submission code so you can call it
outside of a web request and do all the debugging in the celery side.  Then
you can use tested celery interface code if you have to debug the web side.

Approaching it from a test first approach will make things much simpler and
faster to accomplish.
On Feb 28, 2013 11:00 AM, <wingide-users-request at wingware.com> wrote:

> Send wingide-users mailing list submissions to
>         wingide-users at wingware.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://wingware.com/mailman/listinfo/wingide-users
> or, via email, send a message with subject or body 'help' to
>         wingide-users-request at wingware.com
>
> You can reach the person managing the list at
>         wingide-users-owner at wingware.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of wingide-users digest..."
>
>
> Today's Topics:
>
>    1. thoughts on debugging a combination django/celery site
>       (Chris Curvey)
>    2. Re: thoughts on debugging a combination django/celery site
>       (Wing IDE Support)
>    3. debugging heroku with Wing (John Goodleaf)
>    4. "Go back" (Eric Earnst)
>    5. Re: "Go back" (Wing IDE Support)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 27 Feb 2013 10:23:20 -0500
> From: Chris Curvey <chris at chriscurvey.com>
> To: wingide-users <wingide-users at wingware.com>
> Subject: [wingide-users] thoughts on debugging a combination
>         django/celery   site
> Message-ID:
>         <
> CADfwSsBHFFoXeG7kiHSPTSNzPbdC0cn5QinTa-kxwA_W9qfpVg at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I'm in the process of splitting my monolithic Django application into a
> series of Celery tasks.  Django can kick off a bunch of tasks, then loop
> around to get the results.  (Both the Django code and the Celery code live
> in the same Wing project.)
>
> Of course, now I have a number of python interpreters to deal with when I
> want to debug.  I had two ideas for how to handle this:
>
> 1) copy wingdbstub.py to djangodebugstub.py and celerydebugstub.py, and
> import the the files appropriately.  I can then use  kWingDebugDisabled  to
> control which remote process connects to Wing for debugging purposes.
>
> 2) Copy wingdbstub.py to djangodebugstub.py and celerydebugstub.py,  but
> have different ports for django and celery.  I could then run two Wing
> instances, and debug back and forth between the two.  I'm just not sure how
> to use kWingHostPort and kAttachPort in this situation.  And I'm wondering
> if I would need two Wing projects -- one that contains all the Django
> stuff, and one that only contains the Celery tasks.
>
>
> Are there any smarter ways of doing this?
>
> --
> e-Mail is the equivalent of a postcard written in pencil.  This message may
> not have been sent by me, or intended for you.  It may have been read or
> even modified while in transit.  e-Mail disclaimers have the same force in
> law as a note passed in study hall.  If your corporate attorney says that
> you need an disclaimer in your signature, you need a new corporate
> attorney.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> </pipermail/wingide-users/attachments/20130227/8f1199a0/attachment-0001.html>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 27 Feb 2013 16:21:55 -0500
> From: Wing IDE Support <support at wingware.com>
> To: chris at chriscurvey.com
> Cc: wingide-users <wingide-users at wingware.com>
> Subject: Re: [wingide-users] thoughts on debugging a combination
>         django/celery site
> Message-ID: <512E78F3.6000908 at wingware.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On 2/27/13 10:23 AM, Chris Curvey wrote:
> > I'm in the process of splitting my monolithic Django application into a
> > series of Celery tasks.  Django can kick off a bunch of tasks, then loop
> > around to get the results.  (Both the Django code and the Celery code
> > live in the same Wing project.)
> >
> > Of course, now I have a number of python interpreters to deal with when
> > I want to debug.  I had two ideas for how to handle this:
> >
> > 1) copy wingdbstub.py to djangodebugstub.py and celerydebugstub.py, and
> > import the the files appropriately.  I can then use  kWingDebugDisabled
> >  to control which remote process connects to Wing for debugging purposes.
> >
> > 2) Copy wingdbstub.py to djangodebugstub.py and celerydebugstub.py,  but
> > have different ports for django and celery.  I could then run two Wing
> > instances, and debug back and forth between the two.  I'm just not sure
> > how to use kWingHostPort and kAttachPort in this situation.  And I'm
> > wondering if I would need two Wing projects -- one that contains all the
> > Django stuff, and one that only contains the Celery tasks.
>
> I might opt for #2, though I also might try to debug most of the time in
> a single process so I could easily step into things as needed.  Multiple
> projects may help when debugging two processes if only to have different
> project names in the window titles.  The files a project contains has no
> affect on runtime behavior in the debugger, so I'd include the set of
> files that I wanted to use project-wide tools such as search in files,
> find uses, and refactoring on.
>
> Cheers,
>
> John
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 27 Feb 2013 18:18:13 -0800
> From: John Goodleaf <john at goodleaf.net>
> To: wingide-users at wingware.com
> Subject: [wingide-users] debugging heroku with Wing
> Message-ID: <DC1343A3898048029171F14B6B450755 at goodleaf.net>
> Content-Type: text/plain; charset="utf-8"
>
> Is anyone out there using Wing to work with Heroku-bound repositories?
> Ideally, I'd like to run things "naturally" which is to say I'd use the
> `foreman start` command to fire up the application for debugging (or
> `foreman run python manage.py runserver`).
>
> (If this is a stupid question, I ask you to bear in mind that I haven't
> really used WingIDE 4 and have been out of touch for a while.)
>
> --
> John
>
>
>
>
> ------------------------------
>
> Message: 4
> Date: Wed, 27 Feb 2013 22:39:12 -0800
> From: Eric Earnst <eric at earnst.com>
> To: wingide-users at wingware.com
> Subject: [wingide-users] "Go back"
> Message-ID:
>         <
> CAP6jRhF2ob5OFVSaMUDpRo77M86XUB0d4L35rK-RcxBnUiZEDA at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi all,
> When I ctrl click on an entity I "Goto definition".  Is there a way to jump
> back to where I was before clicking?
>
> Thanks,
> Eric
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> </pipermail/wingide-users/attachments/20130227/bd012c21/attachment-0001.html>
>
> ------------------------------
>
> Message: 5
> Date: Thu, 28 Feb 2013 11:30:06 -0500
> From: Wing IDE Support <support at wingware.com>
> To: Eric Earnst <eric at earnst.com>
> Cc: wingide-users at wingware.com
> Subject: Re: [wingide-users] "Go back"
> Message-ID: <512F860E.6040305 at wingware.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On 2/28/13 1:39 AM, Eric Earnst wrote:
> > When I ctrl click on an entity I "Goto definition".  Is there a way to
> > jump back to where I was before clicking?
>
> The left pointing arrow right above the editor should take you back.
>
> Cheers,
>
> John
>
>
>
> ------------------------------
>
> _________________________________________________
> Wing IDE users list
> http://wingware.com/lists/wingide
>
> End of wingide-users Digest, Vol 106, Issue 14
> **********************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/wingide-users/attachments/20130228/6b59d357/attachment.html>


More information about the wingide-users mailing list