Merge pull request #39 from Koed00/dev

Sets pickle protocol to highest
This commit is contained in:
Ilan Steemers
2015-08-01 03:37:52 -07:00
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -16,9 +16,9 @@ class Task(models.Model):
name = models.CharField(max_length=100, editable=False) name = models.CharField(max_length=100, editable=False)
func = models.CharField(max_length=256) func = models.CharField(max_length=256)
hook = models.CharField(max_length=256, null=True) hook = models.CharField(max_length=256, null=True)
args = PickledObjectField(null=True) args = PickledObjectField(null=True, protocol=-1)
kwargs = PickledObjectField(null=True) kwargs = PickledObjectField(null=True, protocol=-1)
result = PickledObjectField(null=True) result = PickledObjectField(null=True, protocol=-1)
group = models.CharField(max_length=100, editable=False, null=True) group = models.CharField(max_length=100, editable=False, null=True)
started = models.DateTimeField(editable=False) started = models.DateTimeField(editable=False)
stopped = models.DateTimeField(editable=False) stopped = models.DateTimeField(editable=False)
+1 -1
View File
@@ -37,7 +37,7 @@ class PickleSerializer(object):
@staticmethod @staticmethod
def dumps(obj): def dumps(obj):
return pickle.dumps(obj) return pickle.dumps(obj, protocol=pickle.HIGHEST_PROTOCOL)
@staticmethod @staticmethod
def loads(data): def loads(data):