vapor / queues

A queue system for Vapor.
MIT License
169 stars 41 forks source link

make testScheduledJob faster #37

Closed tanner0101 closed 5 years ago

tanner0101 commented 5 years ago

Right now the smallest unit of time scheduled jobs support is a minute. This makes waiting for the scheduled jobs test to run pretty annoying.

Maybe we should add seconds or a schedule(at:Date) method? This would allow us to run the tests a lot faster and could be useful to the end user.

jdmcd commented 5 years ago

Yeah, this is an annoying pain point right now. Adding another smaller unit seems like overkill since I'm not sure people will be scheduling things at that increment (although maybe they will?).

tanner0101 commented 5 years ago

Yeah that's why I was thinking maybe schedule(at:) for one-off jobs? That seems generally useful. Then in tests we could schedule a one-off job ~5 seconds in the future.

jdmcd commented 5 years ago

Yeah I think that’s the way to do it. That’s a helpful feature to have anyway