Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sehrishnaz/0f3395814cfc8ea0197d29983e5faf0c to your computer and use it in GitHub Desktop.
Save sehrishnaz/0f3395814cfc8ea0197d29983e5faf0c to your computer and use it in GitHub Desktop.
Use Multi Threading to Seed Up Processing in Odoo
def split_list(self,alist, wanted_parts=1):
length = len(alist)
return [ alist[i*length // wanted_parts: (i+1)*length // wanted_parts] for i in range(wanted_parts) ]
if data:
A,B,C,D,E,F,G,H,I,J = split_list(data, wanted_parts=10)
@sehrishnaz
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment