Jump to content
jowi

Python daemon not working

5 posts in this topic Last Reply

Recommended Posts

I've been running a python daemon based upon: https://gist.github.com/dcai/1075904/6f7be00f7f411d5c2e7cd1691dcbb68efacb789c for some years (!) now, but since i've relocated (and rebooted) my unraid machine, the daemon won't start anymore? The calling code (look at demo code) calls daemon.start() and then should start self.run() where the actual code loop lives, but it looks like it doesn't get that far. Also no exceptions or anything. The pid is created, and i get back to the prompt... and when i stop the daemon (python democode.py stop) it does remove the pid file... but if i add print comments in daemon.start() etc it does not get executed... i'm running unraid 6.5.3, ever since it came out, and also the daemon ran without issues. Literally for years, also with previous versions. Also, if i rebooted, the go file just started the daemon as well without any issues, for years on end, but now... something is broken. I have no clue. Or does it have anything to do with python 2 becoming obsolete?

 

(The actual daemon checks my Pioneer Kuro for some settings and power modes)

Share this post


Link to post

I think i'm gonna reuse my original code (it was ported from c# to python) and create an asp.net core (blazor) docker for this, and run this on unraid. I don't like python anyway. Language is nice but it is always complaining about tabs and spaces and indentation, what a joke.

Share this post


Link to post

Just discovered the user scripts plugin. Why no one pointed me to this i don't know, but that is a way nicer way to do these sort of things :)

Share this post


Link to post
On 7/24/2020 at 3:44 PM, jowi said:

Just discovered the user scripts plugin. Why no one pointed me to this i don't know, but that is a way nicer way to do these sort of things :)

Do you need a custom version of Unraid with Python builtin?

If so please feel free to contact me and I will create you one and also will tell you how you can build it yourself ;)

 

EDIT: Oh and of course you also could use the Nerd Pack from the CA app to install Python... :D

 

Share this post


Link to post

Yeah, i've installed python using nerd/devpack. So that is all ok :)

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.