Repo is not available after using create_repo API method

After creating a repo with the create_repo method, I can’t see it appear in the rhodecode web interface, and I think that calling further methods on the new repo also failed. It seems that there’s some delay, because a few hours later the repo was visible and usable.

I had a similar problem before when using update_repo to move a repo to a new repo group, but in that case I seemed to solve it by running invalidate_cache. But after create_repo, even running invalidate_cache and maintenance makes no difference: the repo is still not available.

Is the repo creation handled asynchronously? Is there a way to prompt it by script, or at least wait for it?

Rhodecode version: 5.5.2

Hi,

yes repo creation is done via Celery workers, and is done async.

In API Return data you get:

result: {
“msg”: “Created new repository ``”,
“success”: true,
“task”: “”
}

task_id is celery task, you can call get_repo until it’s available to setup repo automatically

this should be fixed as of 5.8.1