Simple task queues with Flask & Redis - An introduction - Learning Flask Series Pt. 21

  Рет қаралды 53,963

Julian Nash

Julian Nash

Күн бұрын

Пікірлер: 60
@lazypunk794
@lazypunk794 4 жыл бұрын
If anyone else got this error like me : "ValueError: Functions from the __main__ module cannot be processed by workers" try and put your "background_task()" in a different file and import it here from that module. Works.
@raoofnaushad4318
@raoofnaushad4318 4 жыл бұрын
Thankyou man
@boychoi9x
@boychoi9x 4 жыл бұрын
why is that happen?
@tahep3906
@tahep3906 2 жыл бұрын
This is the solution, thanks for sharing with us
@la_da_kid
@la_da_kid 4 жыл бұрын
Solid tutorial bro, way better than some of the ones I found online that overcomplicated the hell out of this
@lewismenelaws2344
@lewismenelaws2344 5 жыл бұрын
Amazing video. Got right to the point, easily described what Redis and Queue Manager does and a great demonstration. This video deserves more views. Cheers Julian.
@arjunraghav007
@arjunraghav007 2 жыл бұрын
Thanks, this is very consise and clean, good one, I was also searching for same kind of tutorial with celery and django.
@raihanflores
@raihanflores 5 жыл бұрын
Starting a project using Python + RQ.. this helps big time. Thanks!
@dano2169
@dano2169 5 жыл бұрын
How is it that you only have 700 subs? This content was excellent, will promote.
@ServetEdu
@ServetEdu 5 жыл бұрын
Total goldmine, but he has gained 260 subscribers in the last 30 days, so things are looking good!
@sergeyshevtsov5125
@sergeyshevtsov5125 5 жыл бұрын
Nice example. Good for start. Thanx Julian!
@csvjcsvj3325
@csvjcsvj3325 5 жыл бұрын
Thanks, that was most helpful and at the the right pace!
@qudusagbalaya169
@qudusagbalaya169 4 жыл бұрын
Big ups my guy. You're a life saver
@dorson38
@dorson38 2 жыл бұрын
Thx for this video. Very helpful. How would retrieve the value of (n) which is return by the background task once this finished to be executed by the redis worker?
@LockStockNBarrel
@LockStockNBarrel 5 жыл бұрын
How do you get and do something with the return of the queued task? Say your queued task returns a number you want to then display on the client after its been processed. In your example the return len(q)
@michaels8297
@michaels8297 4 жыл бұрын
I was wondering the same thing. Did you find info on this?
@michaels8297
@michaels8297 4 жыл бұрын
python-rq.org/docs/results/ useful info that addresses this
@rayanfernandes2631
@rayanfernandes2631 4 жыл бұрын
Subscribed right away ... you took away my headache :)
@aatkarelse8218
@aatkarelse8218 4 жыл бұрын
noice !, no BS no lengthy explanation on stuff that i dont need, just have to ignore the windows10 and the vscode but cant have it all, Subbed !
@gopalkisi8665
@gopalkisi8665 3 жыл бұрын
ValueError: Functions from the __main__ module cannot be processed by workers.
@dorson38
@dorson38 2 жыл бұрын
Nice Tutorial and thank you. How would you proceed if you do not know how long a task will take to execute. And how would you store them in a DB to be executed one by one and in serial?
@alxizr
@alxizr 4 жыл бұрын
Hi julian. Thanks for the video. Wanted to ask you if you are going to make a video about thread synchronization and sending the output back to the web client. Thanks.
@misterarek4136
@misterarek4136 4 жыл бұрын
Very nice and clean explanation. Subscribed!
@kevinnordio1145
@kevinnordio1145 2 жыл бұрын
providing links to the code files in your patreon, if you're not already doing it, might incentivize more people to support you.
@ALaaHamoudah
@ALaaHamoudah 4 жыл бұрын
Thank you sooo much, it's very helpful and informative.
@ADQ82
@ADQ82 2 жыл бұрын
Thank you.
@leonchen4609
@leonchen4609 3 жыл бұрын
I'm trying to follow your tutorial, but I got ValueError: Functions from the __main__ module cannot be processed by workers when enqueue the backgroup_task..... why are you able to run the function that's defined inside of your main script ?
@dheerajthodupunoori7431
@dheerajthodupunoori7431 3 жыл бұрын
i have function and i want that to be executed as background task , but that function internally creates two processes using multiprocessing module will that work fine ? could you please help me with this
@ilias4780
@ilias4780 4 жыл бұрын
Thank you very much! Great tutorial!
@jamesang7861
@jamesang7861 4 жыл бұрын
hi i got this error on the worker .... UnpickleError: (u'Could not unpickle', ValueError('unsupported pickle protocol: 4',)) does anyone have any idea?
@istvanmeszaros4112
@istvanmeszaros4112 4 жыл бұрын
I have the same, still struggling what to do with it. Did you find any solution?
@mikeom1308
@mikeom1308 3 жыл бұрын
Hey does any one have a git repo of this? Getting an error TypeError: hset() got an unexpected keyword argument 'mapping'
@PriyanshuKumarleomessi10
@PriyanshuKumarleomessi10 3 жыл бұрын
10:03 made me believe something's wrong with my earphones
@michaels8297
@michaels8297 4 жыл бұрын
I am a bit confused on this point, if this is in a production environment...if a user placed a job on the que would it immediately run if they dont have jobs on the que or would if wait for lets say another logged in users job to finish on the que?
@dreamdomroy
@dreamdomroy 4 жыл бұрын
Thank you! This helps big time!
@clikcspeed
@clikcspeed Жыл бұрын
Thanks
@eaglebrett
@eaglebrett 4 жыл бұрын
Hi Julian, Thanks for a great video, I really enjoy your videos. I am having an issue where q_len is never updating (when I print q_len in the terminal, it continues to show 0 even when I refresh). Could you (or one of the great community) provide some guidance as to what is causing this? Many thanks in advance.
@berrodriquez26
@berrodriquez26 2 жыл бұрын
Lit tutorial !
@tejasarlimatti8420
@tejasarlimatti8420 5 жыл бұрын
Hi how can you spawn multiple rq workers to increase performance ?
@yomajo
@yomajo 2 жыл бұрын
Why not factory? It's Pt 21, not Pt 2, right?
@Zerro1009
@Zerro1009 4 жыл бұрын
What about music? The music is very disturbing, no words are heard.=( The topic is very interesting and important
@gabeaboy6153
@gabeaboy6153 4 жыл бұрын
Heu @JulianNash #JulianNash I followed your tutorial and then tried to transfer it into my larger project and I get an important error for my root project name... Whats with that?
@ricardcantm
@ricardcantm 4 жыл бұрын
I admire you
@lokeshagarwal873
@lokeshagarwal873 4 жыл бұрын
child_pid = os.fork() AttributeError: module 'os' has no attribute 'fork'
@jeremydeceuster6912
@jeremydeceuster6912 4 жыл бұрын
I'm experiencing the same thing. Have you found a workaround?
@foxcorgi8941
@foxcorgi8941 2 жыл бұрын
@@jeremydeceuster6912 you need WSL
@Superdooperhero
@Superdooperhero 5 жыл бұрын
How are you running Redis on Windows? Which version?
@mattgregory9775
@mattgregory9775 5 жыл бұрын
I was confused about this for a while as well. Julian looks to be using Windows Subsystem for Linux (WSL) and you can develop everything on the Linux side in a virtual environment that you set up there. You can access your C: drive through '/mnt/c'. If you look at Julian's terminal, you can see that's how he did it.
@Marwin3st
@Marwin3st 5 жыл бұрын
thx!
@pial2461
@pial2461 4 жыл бұрын
are you from poland street mate?
@anandjoshi6765
@anandjoshi6765 4 жыл бұрын
If anyone looking for sample project [python+redis+docker with rq-dashboard for monitoring] - github.com/anandjoshi91/thumbnailed
@lonnybulldozer8426
@lonnybulldozer8426 5 жыл бұрын
What's with the terrible beat playing in the background? It's pretty distracting, bro. Sick backwards hat, though bro. That shows me you're a pretty cool guy, and the sick tattoos also show me that. Awesome. I bet you hang out with a lot of babes, huh? They probably just laugh at you, though, huh? Keep it real, Juilos. Keep it real.
@sayhellotoroy
@sayhellotoroy 2 жыл бұрын
link does not work. 403. for all routes. { "kind": "Status", "apiVersion": "v1", "metadata": { }, "status": "Failure", "message": "forbidden: User \"system:anonymous\" cannot get path \"/\"", "reason": "Forbidden", "details": { }, "code": 403 }
Containerizing Python web apps with Docker, Flask, Nginx & uWSGI
25:38
When u fight over the armrest
00:41
Adam W
Рет қаралды 27 МЛН
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 55 МЛН
ЛУЧШИЙ ФОКУС + секрет! #shorts
00:12
Роман Magic
Рет қаралды 36 МЛН
Happy birthday to you by Secret Vlog
00:12
Secret Vlog
Рет қаралды 6 МЛН
Task Queues: A Celery Story
29:39
PyCon AU
Рет қаралды 38 М.
Blazingly Fast JavaScript with ThePrimeagen | Preview
18:22
Frontend Masters
Рет қаралды 108 М.
Python and Redis Tutorial - Caching API Responses
32:26
Part Time Larry
Рет қаралды 57 М.
Introduction to RabbitMQ for Python Developers
12:26
Denis Orehovsky
Рет қаралды 42 М.
How I Use Python-RQ to create a scraper queue
10:39
John Watson Rooney
Рет қаралды 4,7 М.
When u fight over the armrest
00:41
Adam W
Рет қаралды 27 МЛН