Replies: 2 comments 1 reply
-
Hi @binbjz, to me this is not really a python-gitlab issue, but how you're dealing with multiprocessing, so I'd try to find help elsewhere (or maybe in the community chat) - especially considering it works otherwise. python-gitlab's requests to the server are I/O bound, so I don't think multiprocessing is the solution here, but asyncio: For an example of an async wrapper around python-gitlab, you can get some inspiration from https://github.com/pan-net-security/aio-gitlab. So I think we can close this if that's ok but reopen if you disagree! :) Edit: or we can turn this into a discussion as well if the community wants to help. |
Beta Was this translation helpful? Give feedback.
-
Hi @nejch, I really don't have any ideas on this part, but I was hoping to get some help. I don't understand why it's not callable. How do I use asynchrony for my program? |
Beta Was this translation helpful? Give feedback.
-
Description of the problem, including code/CLI snippet
Expected Behavior
project should be callable object
Actual Behavior
AttributeError: 'str' object has no attribute 'branches'
Specifications
First way - works fine (Multiple processes are not used)
Second way --> An exception is thrown (Multiple processes are used)
for branch in prj.branches.list(all=True): --> AttributeError: 'str' object has no attribute 'branches'
Execute the program to call cl_all_br_fmt
Why can the following method be called ?project.branches
Why is this object a string type and it's not callable
How can I fix it ? I need to use multiple processes to speed up processing jobs
Please help me to fix this issue
Beta Was this translation helpful? Give feedback.
All reactions