Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new scheduler parameter for control pending jobs size #19

Closed
asvetlov opened this issue Nov 6, 2017 · 3 comments
Closed

Add a new scheduler parameter for control pending jobs size #19

asvetlov opened this issue Nov 6, 2017 · 3 comments

Comments

@asvetlov
Copy link
Member

asvetlov commented Nov 6, 2017

await scheduler.spawn(...) should wait if too many pending jobs are scheduled.

@ebeseda
Copy link
Contributor

ebeseda commented Dec 20, 2017

From your comment to PR #16 : spawn_nowait should raise an exception if too many pending jobs.

Seems like you want self._pending act like a standard asyncio.Queue
where await q.put(item) waits for a free slot and q.put_nowait(item) raises QueueFull exception.

Is it necessary to use deque for self._pending ?

@asvetlov
Copy link
Member Author

Technically no. asyncio.Queue with limited size should work fine.

asvetlov pushed a commit that referenced this issue Mar 10, 2018
* #19: Add a new scheduler parameter for control pending jobs size

* Clear pending queue properly.
@asvetlov
Copy link
Member Author

Fixed by #24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants