alvin0 / redis-model

MIT License
73 stars 6 forks source link

Horizon and redis model serialized #17

Open killua99 opened 3 days ago

killua99 commented 3 days ago

Hi thank you for the package.

I was wondering if serialization could be more effective when working with queue / horizon.

When I save a job injecting the model it thrown an error with issues serialized the connection parameter, if I use the serializedmodel it start working.

Now if the module suffers any modifications the injection doesn't bring it fresh from redis but the payload from the queue.

I've to manually update the model on the construction method.

How could it be more compatible with queue ? also could be an option to use the sort redis feature ? you can take a look how horizon implement this

alvin0 commented 11 hours ago

I'm very glad that this package has been helpful to you. However, I am currently quite busy with my project, so it might take some time before I can investigate and resolve your issue. If you have a solution, I hope you can create a pull request for me that includes the code that resolves the issue and its unit tests. I look forward to your contribution <3.