taskiq-redis icon indicating copy to clipboard operation
taskiq-redis copied to clipboard

Custom serializers

Open quizmoon opened this issue 1 year ago • 4 comments
trafficstars

Would be great to have custom serializers in set/get results, or at least JSON, like it is implemented in the main project TaskIQ.

quizmoon avatar Apr 19 '24 17:04 quizmoon

True. Will add soon.

s3rius avatar Apr 19 '24 17:04 s3rius

Look, I've checked the code and you can do so already. You can set custom serializers in the constructor.

s3rius avatar Apr 19 '24 22:04 s3rius

@s3rius , in the backend part it is hardcoded, e.g in "set_result":

        redis_set_params: Dict[str, Union[str, bytes, int]] = {
            "name": task_id,
            "value": pickle.dumps(result),
        }

quizmoon avatar Apr 22 '24 07:04 quizmoon

I see now. Accidentally skipped it. We will add a new parameter to the constructor.

s3rius avatar Apr 22 '24 08:04 s3rius