update.php --quiet isn't quiet enough

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
craywolf
Mr. Awesome
Posts: 97
Joined: 19 Mar 2013, 18:07

update.php --quiet isn't quiet enough

Postby craywolf » 28 Mar 2013, 20:07

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.

Joschasa
Bear Rating Trainee
Bear Rating Trainee
Posts: 34
Joined: 03 May 2010, 11:58

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

Postby Joschasa » 28 Mar 2013, 23:34

$ ./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.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

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

Postby fox » 28 Mar 2013, 23:37

Nah, it shouldn't. Thanks!

craywolf
Mr. Awesome
Posts: 97
Joined: 19 Mar 2013, 18:07

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

Postby craywolf » 29 Mar 2013, 00:17

Thanks, Joschasa. With those changes, my quiet update no longer needs an extra grepping. Much appreciated.

craywolf
Mr. Awesome
Posts: 97
Joined: 19 Mar 2013, 18:07

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

Postby craywolf » 29 Mar 2013, 23:27

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.
Last edited by craywolf on 29 Mar 2013, 23:28, edited 1 time in total.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

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

Postby fox » 29 Mar 2013, 23:27

I think it should make a neat .... thing. This can be safely removed.


Return to “Support”

Who is online

Users browsing this forum: No registered users and 2 guests