Commit Graph

34 Commits

Author SHA1 Message Date
Higan 3b2dcd869b
issue-654: allow setting a stopTime for job. (#760) 2024-07-19 13:10:28 -05:00
John Roesler 256265f9a2
internal refactoring of JobOption constructor, clock moved to exec (#761) 2024-07-18 11:32:56 -05:00
apocelipes f37e274abb
issue-756: fix interface variadic parameters verifying (#757) 2024-07-17 06:56:17 -05:00
Higan 2c08083603
issue-677: support task creation with variadic args (#755) 2024-07-11 21:24:08 -05:00
Samuel Attwood 9747c90947
issue-751: fix bug in selectExecJobsOutForRescheduling (#752) 2024-07-09 09:39:51 -05:00
John Roesler 9d27ea8673
minor refactor 2024-07-01 09:28:04 -05:00
Rodrigo Broggi 212db8e476
issue-740: ascending time function (#744)
* issue-740: ascending time function

* issue-740: update documentation

* issue-740: un-export ascending function

* issue-740: sentence correction
2024-06-23 13:14:35 -05:00
Rodrigo Broggi 7c391d4326
issue-742: bug in `NextRun` (#743)
* issue-742: bug in `NextRun`

* issue-742: bug in `NextRun` correction
2024-06-21 09:17:34 -05:00
Rodrigo Broggi fd18ca7b52
issue-736: moving validation of one-time to (#737)
Co-authored-by: John Roesler <johnrroesler@gmail.com>
2024-06-20 14:21:05 -05:00
John Roesler d808cd93a2
add note about limit mode precedence sched vs. job 2024-05-06 10:26:56 -05:00
John Roesler e46cdc9d11
fix memory leak with singleton mode where job is sending duplicate reschedule requests (#723)
* fix memory leak with singleton mode where job is sending duplicate reschedule requests

* add a comment

* fix memory leak for limitmode as well

* tests are happy locally - some timing issues in actions
2024-05-02 11:35:57 -05:00
Giridharan Ramasamy 5f14dac979
Added JobsWaitingInQueue in Scheduler (#721)
* Added JobsWaitingInQueue in Scheduler

* Fixed tests
2024-04-30 14:32:20 -05:00
John Roesler 3b653b99e4
fix nextRun with singleton mode reporting incorrect time (#705)
* fix nextRun with singleton mode reporting incorrect time

* only remove past if >1, sort next scheduled

* update test, remove no longer needed lastScheduledRun
2024-04-05 20:56:22 -05:00
John Roesler dcd4edae17
fix case where OneTimeJob with concurrent limit and limited runs fails to run (#703) 2024-03-26 16:29:25 -05:00
John Roesler 9ae7545c27
add another out channel so we can properly report lastRun (#700)
* add another out channel so we can properly report lastRun

* don't block on channel send

* add tests
2024-03-26 09:55:21 -05:00
John Roesler 41dd412a49
fix case where job removed causes panic when rescheduling (#698) 2024-03-23 13:57:09 -05:00
John Roesler b1ffc665fb
fix RunNow() when calling from a job returned by Jobs() (#668) 2024-02-02 09:46:08 -06:00
John Roesler 567cb9695c
fix unsafe map usage in singletonMode (#665)
* fix singletonMode unsafe map

* update lint issues

---------

Co-authored-by: a3sroot <a3sroot@gmail.com>
2024-01-30 15:50:10 -06:00
John Roesler 5c69001e27
Add job monitor interface to allow for collecting job metrics (#659)
* Add metrics each run of job

* Fix lint

* Fix test lint

* Fix backwards job status

* Add tags

* Comment example

* Rename it

* Fix some names

* Fix readme

* update readme, examples, naming

* fix unrelated test that was leaking scheduler

* remove overzealous leak detection

* rename interface methods

---------

Co-authored-by: gorodet-sky <gorodetsky.dev@gmail.com>
2024-01-17 15:39:11 -06:00
John Roesler 800821c923
wait for new job to be fully created before returning (#658) 2024-01-17 11:48:25 -06:00
John Roesler ae366d91ea
make the order of the returned jobs slice deterministic (#652) 2024-01-02 10:47:01 -06:00
John Roesler 29a2f29e3c
fix to handle when next ends up in the past (#650)
* fix to handle when next ends up in the past

* add code comments
2024-01-02 10:32:14 -06:00
John Roesler a51820e30f
fixup Job and Scheduler interface docs 2023-12-20 15:16:16 -06:00
John Roesler 93fecb6152
move scheduler docs to interface 2023-12-20 07:13:58 -06:00
John Roesler 6e15f16d77
add new features, OneTimeJob and Job.RunNow() (#646) 2023-12-18 21:13:37 -06:00
John Roesler 80a4f43686
check function param length and type (#638) 2023-12-14 13:52:32 -06:00
John Roesler aa4400d224
Update docs, tests, and release prep (#629) 2023-12-11 10:39:59 -06:00
John Roesler 5814fbcb6f
allow max concurrent runs and singleton mode together (#625) 2023-11-28 06:48:22 -06:00
John Roesler 63225ac1a9
export function comments 2023-11-22 06:43:50 -06:00
John Roesler 7fea987137
add distributed locker for v2 (#614)
* add distributed locker for v2

* fix logger test

* enhance logger test
2023-11-14 09:56:05 -06:00
John Roesler ad5613c55f
update docs and add mocks pkg (#610) 2023-11-09 16:00:18 -06:00
John Roesler 4a57125579
test all remaining With*, and test logger (#609) 2023-11-09 15:04:18 -06:00
John Roesler 6f9a8200f4
support go 1.20+ (#608) 2023-11-09 09:49:21 -06:00
John Roesler ad26a71e0e
initial clean v2 commit history 2023-11-08 11:11:42 -06:00