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

rabbyt.scheduler error #8

Open
cajomar opened this issue Oct 6, 2020 · 0 comments
Open

rabbyt.scheduler error #8

cajomar opened this issue Oct 6, 2020 · 0 comments

Comments

@cajomar
Copy link

cajomar commented Oct 6, 2020

I get this:

  File "/usr/local/lib/python3.8/dist-packages/rabbyt/__init__.py", line 61, in add
    heapq.heappush(self.heap, (time, callback))
TypeError: '<' not supported between instances of 'function' and 'function'

If you change it to heapq.heappush(self.heap, (time, self.count, callback)), increment self.count afterwards (as described here), and change heapq.heappop(self.heap)[1]() to heapq.heappop(self.heap)[2]() it should fix the error.

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

1 participant