Python Forum
Good way to have a worker queue accessible by multiple process?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Good way to have a worker queue accessible by multiple process?
#1
I have a couple scripts scraping data from multiple websites. The next step is processing the data. I want to setup a worker that receives data and process the data. What is a good pipeline/workflow approach to having one worker always running and waiting for task to come in.

I thought something like an API server to process the request. But is there a better solution?
Reply
#2
If I were going to do it, I'd probably setup a simple Flask server. You could use sockets or some other kind of inter-process communication (including, maybe, writing to files or a database).
Reply
#3
See pyzmq. You can build messaging infrastructure with twenty lines of code. Or less.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Global variables or local accessible caslor 4 1,021 Jan-27-2023, 05:32 PM
Last Post: caslor
  Run multiple process using subprocess Shiri 3 3,824 Nov-28-2021, 10:58 AM
Last Post: ghoul
  Process multiple pdf files Spartan314 1 1,316 Oct-27-2021, 10:46 PM
Last Post: Larz60+
  Suspending worker threads olderguy 1 2,023 Apr-21-2021, 10:28 AM
Last Post: Larz60+
  Defining multiple functions in the same def process sparkt 5 2,829 Aug-09-2020, 06:19 PM
Last Post: sparkt
  task queue Valon1981 8 3,598 Jul-07-2020, 07:41 AM
Last Post: freeman
  How to make Python 3.7.6 accessible to users Doguhan 4 2,780 May-19-2020, 05:36 PM
Last Post: snippsat
  Queue in Pygame constantin01 1 3,682 Jan-07-2020, 04:02 PM
Last Post: metulburr
  How to sharing object between multiple process from main process using Pipe Subrata 1 3,661 Sep-03-2019, 09:49 PM
Last Post: woooee
  Queue maxsize mr_byte31 2 4,544 Sep-03-2019, 07:02 PM
Last Post: mr_byte31

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020