OK. I will try

On Friday, February 27, 2015 at 2:08:34 PM UTC+2, Graham Dumpleton wrote:
>
> The likely issue then is the fact that you stuck your algorithm 
> in mathsite/utils.py. Thus it is within your sites code.
>
> If mathsite/__init__.py is not just an empty file and instead drags in 
> other parts of your code or Django, then you will infect your algorithm 
> code even if the algorithm code doesn't use Django itself.
>
> The only way around that would be to split the utils.py function out into 
> a separate package.
>
> Thus, parallel to mathsite directory create a directory mathutils. In that 
> create an empty __init__.py and then move mathsite/utils.py and any other 
> non web site files it uses into mathsite.
>
> You would then be importing mathutils.utils instead of mathsite.utils.
>
> So you are separating the two code bases so they are independent.
>
> I am going to sleep now. See if you can work out what I mean by that and 
> collect together than other information I asked about the install location 
> of the 'django' package and what is in the httpd.conf file.
>
> Right now it almost appears like you accidentally uninstalled django.
>
> Graham
>
> On 27/02/2015, at 11:03 PM, Paul Royik <[email protected] <javascript:>> 
> wrote:
>
> The reason is not in settings.
> I just use reverse function.
> When I removed it, new error appeared, connected with Django logging.
> But I don't use logging.
>
> On Friday, February 27, 2015 at 1:54:19 PM UTC+2, Graham Dumpleton wrote:
>
>
> On 27/02/2015, at 11:15 AM, Paul Royik <[email protected]> wrote:
>
> I don't use database, but use settings and it keeps telling me, that 
> settings and logging are not initialised.
>
>
> Why do you have to have your algorithm dependent on Django settings?
>
> As I have noted, this is not a good idea as it means you will pull in 
> quite a lot of Dango code into your algorithm process. Sort of partly 
> defeats the purpose of doing it, as part of the reason was so that it 
> doesn't use as much memory so you can handle having more of them running in 
> parallel.
>
>
> class RunableProcessing(multiprocessing.Process):
>     def __init__(self, func, *args, **kwargs):
>         self.queue = multiprocessing.Manager().Queue(maxsize=1)
>         args = (func,) + args
>         multiprocessing.Process.__init__(self, target=self.run_func, 
> args=args, kwargs=kwargs)
>
>     def run_func(self, func, *args, **kwargs):
>         try:
>             result = func(*args, **kwargs)
>             self.queue.put((True, result))
>         except Exception as e:
>   
>
> ...

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to