Page 1 of 1

update.php --quiet isn't quiet enough

Posted: 28 Mar 2013, 20:07
by craywolf
I just changed my cron job to this, so I can get emails about failures but not get an email every time:

Code: Select all

*/30 * * * * cd /home/user/public_html/tt-rss && /usr/bin/php /home/user/public_html/tt-rss/update.php --feeds --quiet 2>&1


Works great. Except that it's not quiet enough - on a successful update it outputs a single blank line, which cron dutifully emails to me. I've patched it up for now by passing it through egrep -v "^$", but it might be worth fixing in code.

Re: update.php --quiet isn't quiet enough

Posted: 28 Mar 2013, 23:34
by Joschasa
$ ./update.php --feeds
[19:28:43/3208] Scheduled 0 feeds to update...

[19:28:43/3208] Expiring cache/simplepie
[19:28:43/3208] Removed 0 files.
[19:28:43/3208] Expiring cache/images
[19:28:43/3208] Removed 0 files.
[19:28:43/3208] Expiring cache/export
[19:28:43/3208] Removed 0 files.
[19:28:43/3208] Removing old lock files...
[19:28:43/3208] Removed 0 files.
[19:28:43/3208] Sending digests, batch of max 15 users, headline limit = 1000
[19:28:43/3208] All done.
[19:28:43/3208] Feedbrowser updated, 308 feeds processed.
[19:28:44/3208] Purged 0 orphaned posts.

[19:28:44/3208] Cleaned 0 cached tags.


I filed a push request to remove the output of both blank lines.
https://github.com/gothfox/Tiny-Tiny-RSS/pull/98

I hope this doesn't break some design in any other update method, didn't check that.

Re: update.php --quiet isn't quiet enough

Posted: 28 Mar 2013, 23:37
by fox
Nah, it shouldn't. Thanks!

Re: update.php --quiet isn't quiet enough

Posted: 29 Mar 2013, 00:17
by craywolf
Thanks, Joschasa. With those changes, my quiet update no longer needs an extra grepping. Much appreciated.

Re: update.php --quiet isn't quiet enough

Posted: 29 Mar 2013, 23:27
by craywolf
Ok, now I'm getting emails from cron with just a single "." in them. I think I've tracked it down to this line in include/functions.php line 3806:

Code: Select all

            if (count($ids) > 0) {
                $ids = join(",", $ids);
                print ".";


I've commented out that line in my local copy. I think that's the last random print statement in there, the rest look like they're in functions whose purpose is to print things, and error messages.

Re: update.php --quiet isn't quiet enough

Posted: 29 Mar 2013, 23:27
by fox
I think it should make a neat .... thing. This can be safely removed.