lilspikey / django-background-task

A database-backed work queue for Django
BSD 3-Clause "New" or "Revised" License
107 stars 200 forks source link

Fix args as str #25

Open vincent-lg opened 5 years ago

vincent-lg commented 5 years ago

In my case (Django 1.11, running on Windows, Python 2.7) the arguments to a Django commands are not processed as integers or floats. It means that the duration and sleep argument are always str and are mostly ignored by Python. Since it doesn't seem to be the "normal" behavior and I couldn't find a resource that explained the reason for this strange side-effect, I added a conditional cast which might be somewhat ugly. Lacking any better information, I would say this works for me and shouldn't break anything for others... hopefully.

Thanks for the great app!