Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Laravel 5 - remove all jobs from a queue (redis driver)
Redis::connection()->del('queues:myqueue');
@andrewmclagan

This comment has been minimized.

Copy link

@andrewmclagan andrewmclagan commented May 15, 2017

Wow this saved me....

@TheOnlyMerlin

This comment has been minimized.

Copy link

@TheOnlyMerlin TheOnlyMerlin commented Jul 11, 2017

Saved me a bunch of frustration. Thanks!

@codedigs

This comment has been minimized.

Copy link

@codedigs codedigs commented Oct 26, 2017

how to implement this ? thank you

@fabiobranis

This comment has been minimized.

Copy link

@fabiobranis fabiobranis commented Nov 7, 2017

@Rodz3rd2 you can use the tinker to run the command, so you won't need to implement this.

@gokigoks

This comment has been minimized.

Copy link

@gokigoks gokigoks commented Mar 9, 2018

Hi! how do I do one for beanstalkd?

@milosodalovic

This comment has been minimized.

Copy link

@milosodalovic milosodalovic commented Apr 4, 2018

👍

@mkantautas

This comment has been minimized.

Copy link

@mkantautas mkantautas commented May 24, 2018

del() expects an array, not string... @derhansen care to elaborate ?

@mattkomarnicki

This comment has been minimized.

Copy link

@mattkomarnicki mattkomarnicki commented Jan 16, 2019

Hey @neorganic, just simply wrap the string in an array…

Redis::connection()->del([
    sprintf('queues:%s', $this->getQueueName()),
]);

however I see that passing a string works as well.

@Ravenna

This comment has been minimized.

Copy link

@Ravenna Ravenna commented Mar 8, 2019

Saved my cake!

@jackbaron

This comment has been minimized.

Copy link

@jackbaron jackbaron commented Jan 27, 2021

Hi all!
How to insert queue on redis.
Example: Redis::conection()->add([dataQueueInsert])
is there any way like that?

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