Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add --cron option #43

Closed
wants to merge 5 commits into
from

Conversation

Projects
None yet
4 participants
Contributor

danlucraft commented May 26, 2011

This option is like --silent except if there is an error it will print a full backtrace.

The motivation for this option is cronjobs. We get emails about cron tasks if there is any output at all, hence we use --silent to quiet rake down. But if a cronjob has failed (often overnight) you would like the email to contain as much information as possible about the error, so this prints backtraces.

BTW this relies on the previous pull request about tests to make it's tests work.

Owner

jimweirich commented Jun 5, 2011

Interesting idea ... I'm considering it. Not wild about the option name, I would rather name it for what it does rather than where it is intended to be used.

Contributor

danlucraft commented Jun 6, 2011

Good thinking. I'm finding it hard to come up with better names that aren't verbose. --silent-trace perhaps?

Contributor

quix commented Jun 6, 2011

I never understood why backtraces were suppressed in the first place. I have performed this ritual many times: swear, add --trace, re-run, wait all over again. In fact I think this was the genesis of Drake.

Besides cron jobs this will also be useful in rake tasks run during deployment. For example, when doing a fresh deployment, if a rake task fails the remote source tree is destroyed and thus even invoking rake with --trace is not easily possible.

As others said I do not understand why printing backtraces is not default behavior: #31

Owner

jimweirich commented Aug 5, 2011

Rake in master now prints a truncated backtrace by default. Is this sufficient for you?

@jimweirich jimweirich closed this Oct 18, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment