Undefined DAEMON_SLEEP_INTERVAL causes PHP warning in update.php

In commit e6c886bf the contents of rssfuncs.php was moved into its own class in rssutils.php. The problem is when running update.php --daemon the constant DAEMON_SLEEP_INTERVAL is used on line 185 before being defined. This happens because rssfuncs.php was previously manually included at the top of the file, but now rssutils.php is auto-loaded when the class is referenced, which doesn’t happen until later.

The end result is basically the daemon is spawning update tasks every 1-second.

e: @fox, I’d normally just do a pull request, but since you’re sort of in the process of re-organizing the code, I figured a post here would be better.

oh yeah, woops. my bad.

e: apparently i have a custom value for this in config.php which is why i haven’t noticed

Yeah… I noticed the weird behaviour when running top. My PHP log has 25137+ entries since I updated this morning. :slight_smile:

e: Apparently it’s not every one second like I mentioned, it’s basically just as fast as possible.

Look at that… already patched… service with a smile… and some extra code to prevent it from happening again.

and some extra code to prevent it from happening again.

yep, stuff like this can easily get a shit-tier VDS of some poor sod suspended