Commit Graph

11 Commits

Author SHA1 Message Date
Fei Yang
8b4edf5920 refactor: reap zombie process and opt-out with no-reap flag (#172)
* fix: random waitid error

fix https://github.com/aptible/supercronic/issues/171

* fix(reap): forward signal

* refactor: modify reaper to get supercronic exitStatus

* fix(reaper): unify signal list & fix signal forward

* chore: replace ioutil to io

* fix(test): ci timeout

* opt-out with no-reap flag

Co-authored-by: Josh Raker <48493233+joshraker@users.noreply.github.com>

* fix: typo on signal

* fix: args pass to supercronic

* fix(test): remove removed flag

* chore: remove misleading comment

---------

Co-authored-by: Josh Raker <48493233+joshraker@users.noreply.github.com>
2024-10-10 12:44:43 -04:00
Thomas Orozco
907ac7f3d3 Support CRON_TZ
Like it says in the title. This adds support for CRON_TZ.

Fixes: #77
2020-11-14 18:06:52 +00:00
Thomas Orozco
7001f7b6a9 Add -pasthrough-logs
This adds support for not capturing logs at all, and instead just
passing them through. This has come up in a number of issues:
 #54, #55, #57, #65.
2020-07-04 13:05:03 +01:00
Sevag Hanssian
3676bcc415 PR feedback 2019-06-03 07:05:58 -04:00
Sevag Hanssian
2eab28fb30 Fix tests 2019-06-02 09:27:34 -04:00
Thomas Orozco
e7ecf3f459 Add overlapping flag
This allows overlapping instances of a given job. To make this easier to
test, this also refactors `StartJob` into a helper `startFunc` to make
this functionality easier to unit test.

Co-authored-by: Pavel Popov <pavelpopov@outlook.com>
2019-02-08 15:28:32 +01:00
Thomas Orozco
398e49a968 Use a context to exit after being signalled
Using a (cancellable) context is a little more idiomatic than
re-implementing one using a channel, and it's a little more efficient
(since we share one context across all job goroutines, as opposed to
requiring one cancel channel per goroutine).
2018-04-23 14:38:06 +02:00
Thomas Orozco
4a929a35a6 startReaderDrain: handle arbitrarily long lines
`bufio.Scanner` can only handle lines up to 64kB. Beyond that, it'll
crash with `bufio.Scanner: token too long`.

We shouldn't crash when this happens. Instead, let's just continue
reading, and warn the user. This is what this does.
2017-09-04 11:27:59 +02:00
Thomas Orozco
0e133a9560 Fix: Supercronic skips a beat
We're launching everything one iteration later than scheduled. That's
not great!

I'd like to rethink the test approach a little bit here. Testing through
the logger is not ideal (we should probably just pump all the logs
through channels back to the main goroutine).
2017-07-11 20:33:13 +02:00
Thomas Orozco
4023ab896e StartJob: basic test 2017-07-11 12:56:20 +02:00
Thomas Orozco
1fb787cbcb Add cron RunJob tests 2017-07-11 12:56:19 +02:00