If you pass a Django QuerySet or a Django Model as an argument to a task, very bad things happen. They get pickled as a huge object that takes a lot of Memory, which balloons the amount of RAM taken by the broker, balloons the amount of RAM used by the worker and also manages to make running the task very slow.
If django exists in the jobtastic environment, assert that all of the kwargs aren't instances of a QuerySet or Model.
Also add a setting to disable this behavior, in case someone wants to optimize away the small amount of overhead this might entail.
If you pass a Django QuerySet or a Django Model as an argument to a task, very bad things happen. They get pickled as a huge object that takes a lot of Memory, which balloons the amount of RAM taken by the broker, balloons the amount of RAM used by the worker and also manages to make running the task very slow.
If django exists in the jobtastic environment, assert that all of the kwargs aren't instances of a QuerySet or Model.
Also add a setting to disable this behavior, in case someone wants to optimize away the small amount of overhead this might entail.