Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion queue_job/delay.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,11 @@ def _tail(self):
return [self]

def __repr__(self):
job_method = ""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be something more user friendly than a void string ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That happens when the current object is related to nothing. So what do you propose? :)

if self._job_method:
job_method = self._job_method.__name__
return "Delayable({}.{}({}, {}))".format(
self.recordset, self._job_method.__name__, self._job_args, self._job_kwargs
self.recordset, job_method, self._job_args, self._job_kwargs
)

def __del__(self):
Expand Down