Skip to content

rabbyt.scheduler error #8

@cajomar

Description

@cajomar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions