Giter Club home page Giter Club logo

Comments (6)

N3MIS15 avatar N3MIS15 commented on May 22, 2024

root@UNRAID:# python /mnt/cache/.custom/maradaemon/Maraschino.py --daemon
Traceback (most recent call last):
File "/mnt/cache/.custom/maradaemon/Maraschino.py", line 33, in
from modules.applications import *
File "/mnt/cache/.custom/maradaemon/modules/applications.py", line 5, in
from Maraschino import app
File "/mnt/cache/.custom/maradaemon/Maraschino.py", line 226, in
daemonize()
File "/mnt/cache/.custom/maradaemon/Maraschino.py", line 128, in daemonize
if CREATE_PID:
NameError: global name 'CREATE_PID' is not defined
root@UNRAID:
# python /mnt/cache/.custom/maradaemon/Maraschino.py --daemon --pidfile="/mnt/cache/maraschino.pid"
Traceback (most recent call last):
File "/mnt/cache/.custom/maradaemon/Maraschino.py", line 33, in
from modules.applications import *
File "/mnt/cache/.custom/maradaemon/modules/applications.py", line 5, in
from Maraschino import app
File "/mnt/cache/.custom/maradaemon/Maraschino.py", line 233, in
from cherrypy import wsgiserver
ImportError: No module named cherrypy
root@UNRAID:~# python /mnt/cache/.custom/maradaemon/Maraschino.py --daemon --pidfile="/mnt/cache/maraschino.pid"
Pidfile /mnt/cache/maraschino.pid already exists. Exiting.

Doesnt throw those errors for me.. the last attempt at launch i changed line 233 to "import wsgiserver"
I used your Maraschino.py with latest master
If i delete the pidfile and try again it give same existing pidfile error

from maraschino.

N3MIS15 avatar N3MIS15 commented on May 22, 2024

i do get the same error as u on ubuntu machine.. maybe it could be a python version issue? on my unraid machine i have 2.6.5 and on ubuntu i have 2.7.2

EDIT: Python 2.6 on karmic has same resaults as unraid machine.. must be a python version thing.

EDIT2: Commenting out lines 128-137 and 220-223 (pidfile stuff) --daemon works on python 2.6

EDIT3: http://dl.dropbox.com/u/56711503/Maraschino.py <- gets passed your error on python 2.7 but still some bugs to iron out

from maraschino.

Mar2zz avatar Mar2zz commented on May 22, 2024

It forks too often. It writes a process to the pidfile, but then it forks and tries to write it again. but then it thinks it is in use, because the file allready exists.

It needs an importlock. I've written my own pythonprogram and now I understand how this works. But it's a lot of work to change it for Maraschino. Since I am focussed on https://github.com/Mar2zz/LazyLibrarian/ now I won't have time to do this for Maraschino. (it doesn't really matter if your distro has a start-stop daemon, which will handle the pid and file.)

from maraschino.

N3MIS15 avatar N3MIS15 commented on May 22, 2024

im working on a plugin for unraid which would benefit from pidfiles greatly. im new to all of this. please correct me if i am wrong, but is the problem that every module is calling "from Maraschino import app" therefor calling it over and over?

from maraschino.

Mar2zz avatar Mar2zz commented on May 22, 2024

Yes, that's a good description. Maraschino needs to know when it is done importing. But they keep importing over and over, because the variables aren't made global. Variables can be made global in maraschino/init.py (see for examples the init.py in SickBeard/sickbeard or Headphones/headphones.

from maraschino.

mrkipling avatar mrkipling commented on May 22, 2024

(again) I believe that this is also covered by the core restructure pull request..!

from maraschino.

Related Issues (20)

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.