Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is a way to remove elements massively? #49

Open
rogerarjona opened this issue Aug 3, 2019 · 3 comments
Open

There is a way to remove elements massively? #49

rogerarjona opened this issue Aug 3, 2019 · 3 comments

Comments

@rogerarjona
Copy link

rogerarjona commented Aug 3, 2019

Hello.
I would like to know if there is a way to delete elements sending a list of ids.

Normally we delete many elements like this:

id_list = ['*1', '*2', '*3', '*4']
for id_queue in id_list:
	list_queues.remove(id=id_queue)

But, there is, or is possible something like this?

id_list = ['*1', '*2', '*3', '*4']
list_queues.remove(id_list)

@jgoclawski , @stevehaskew

@stevehaskew
Copy link
Contributor

As far as I am aware there is not a way to do that currently. All my contributions so far have been around the initial connection etc. and I haven't delved into the resource objects and how to work with/modify them. Unfortunately I don't have the time at the moment to do so.

I like the idea - it makes sense to be able to provide a list and the remove function detect it and act accordingly. Feel free to make a contribution yourself if you are able!

@jiri-lunacek
Copy link

Hello.
I would like to know if there is a way to delete elements sending a list of ids.

Normally we delete many elements like this:

id_list = ['*1', '*2', '*3', '*4']
for id_queue in id_list:
	list_queues.remove(id=id_queue)

But, there is, or is possible something like this?

id_list = ['*1', '*2', '*3', '*4']
list_queues.remove(id_list)

@jgoclawski , @stevehaskew

Hello.
I just came to this project. And found that the following approach works:

id_list = ['*1', '*2', '*3', '*4']
list_queues.remove(','.join(id_list))

@stevehaskew
Copy link
Contributor

Thanks for taking the time to share this solution, it's much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants