12345678910111213141516171819202122232425262728293031323334353637383940 |
- https://www.rabbitmq.com/getstarted.html
- send.py -> receive.py https://www.rabbitmq.com/tutorials/tutorial-one-python.html Hello World.
- uses: hello queue
- new_task.py -> worker.py, worker2.py https://www.rabbitmq.com/tutorials/tutorial-two-python.html Work Queues.
- uses: task_queue
- rpc_client.py -> rpc_server.py https://www.rabbitmq.com/tutorials/tutorial-six-python.html RPC Call
- uses: rpc_queue
- Ok, so save time at the end of the callback, and compare at the start
- of the callback. If > 10 seconds, clear our throttle buffer!
- ^ Ok, here's the problem: Pacer. We get a message, login, process.
- Then what? The problem is, we want to logout after 4-5 seconds of
- nothing to do.
- https://github.com/pika/pika/issues/770
- Replacing:
- channel.start_consuming()
- with
- while channel._consumer_infos:
- channel.connection.process_data_events(time_time=1)
- print("Ok! I can do something between events / when I have no events.")
- See worker2.py for working example of this.
- ^ This allows us to do something (like see if we are logged in, and if a certain amount of time
- has passed or not. We'll be able to logout / do other things.
- I'm not sure about the 1 second. I don't need it to be like that. Maybe 60? (Every minute?) or
- if we're waiting for work, set at 10, if we're logged out, set to 60.
|