Re: moving the extensions and detectors directories?

J Arrizza <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <CAEyOLyD=HgM7kU-ngmCx1sYBODbgXM-iQdf=468jgVyuyBok=A@mail.gmail.com>
Thanks for the reply Bernhard.

I ended up doing something using Python:

1) I moved all of the extensions and detectors to a common library. I
actually have two: one for production and one for testing.

2) In each of the extension and detector files, I renamed
register(instance) to registerAll(instance)

3) I added a single file in extensions called bounce.py:

import sys
sys.path.append('/path/to/prod')
import utils
import local_replace

def init(instance):
    utils.registerAll(instance)
    local_replace.registerAll(instance)


and a similar one in detectors:

import sys
sys.path.append('/path/to/prod')
import checktransition
import emailer
import messagesummary
import nosyreaction
import statusauditor
import userauditor

def init(instance):
    checktransition.registerAll(instance)
    emailer.registerAll(instance)
    messagesummary.registerAll(instance)
    nosyreaction.registerAll(instance)
    statusauditor.registerAll(instance)
    userauditor.registerAll(instance)



I was going to have the init(instance) function do the imports and the
registerAlls by dynamically searching through the test/prod directories,
but this scheme gives me a lot of control over which extensions/detectors
are brought into a particular tracker and yet still have all of the common
code is in one spot. It's a trade-off.

For testing, I just make my changes in the common test directory and then
when I'm ready, I just copy everything from there into prod.

John

On Wed, Dec 12, 2012 at 3:50 AM, Bernhard Reiter <[email protected]>wrote:

> Hi John,
>
> Am Mittwoch, 28. November 2012 03:27:00 schrieb J Arrizza:
> > I have several trackers that have identical modules in the extensions and
> > detectors directories. I was wondering if it's possible to move those
> > directories to a common place and have roundup find them and initialize
> > correctly?
>
> I believe this should be doable by standard methods of your operating
> system
> (e.g. a common directory that is linked to).
>
> If that is not enough, there are probalby more methods as well.
>
> Best,
> Bernhard
>
> --
> www.intevation.de/~bernhard (CEO)    www.fsfe.org (Founding GA Member)
> Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998
> Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
>

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d

_______________________________________________
Roundup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.