New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Greg daemon mode #12
Greg daemon mode #12
Conversation
Create a work process with another user, this process read conf of worker user. If the time of last podcast remote is upper of local save, download the last podcast and set the last timestamp of podcast.
Hello, Pierre, thanks a lot for the effort you've put into this pull request. Could you please walk me through the benefits that you see in using your daemon mode, as opposed to a simple cronjob? You mention flexibility; I'd like to know more about what you have in mind. Cheers, |
Sorry for that, i didn't develop this fact, in my pull request. An example if i run greg with crontab, and i want stop or change some parametre, i need run crontab with the run user greg, to change this (comment line for stop or change the parametre). Close the crontab editor, and wait cron rerun my command for test my change. With daemon, just run one command for stop, and an other for restart with other parametre(if this i want), and i no wait for check the effect of my new parametre. With crontab you need edit file and wait, with daemon no edit and no wait. This not make a big difference i know, but just add freedom in greg possibility usage. Thanks for your interest |
Wheel done, you accept my pull request or not ? |
Hello, Pierre. I've been thinking about your pull request, and I don't think it's a good idea to accept it:
Best, |
Hello, Manolo Pull-request in upstream is probleme I agree, your argumentation. I can rewrite for daemonize use a differente way. I think daemonize with init system is ugly, and not protable (no systemd in Debian like or BSD) and some litle difference in distribution may be need to write script for all different linux. The only core greg modification modification, in core greg is for add commande line option, and factorising function. If you add a plungin system, may bee i can rewrite modification to become a plugin. Best, |
That sounds interesting. I will think of that. Thanks! |
Why greg daemon mode
I search a cli podcast manager for download podcast and listen it with my ampache server.
Greg is the only good result, but greg haven't mode daemon.
Why didn't use greg sync in chron
First because i see this option after work 3 hours, and i didn't wanted get this work in trash.
Second because chron task isn't flexiblity like daemon.
Daemon process
Use daemonic module for :
For each feed :
Stop command :
Option
--time : Required option, set the time (in second) after previous check to rerun
--user : Required option, the name of worker user
--log-dir : Default "/var/log/greg", the flooder of log file
--pid-file : Default "/var/run/greg/greg.pid", the path of pid file
Note
I make change in daemonic, the pull request not yet accepted. You can use https://github.com/natir/daemonic, for test my code.