You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.
I have two aws ec2 instances. Client is running on first ec2 instance and worker is running on second ec2 instance. But worker on second ec2 instance is not responding to clients job and not even throwing any error.
import python3_gearman as gearman
gm_worker = gearman.GearmanWorker(['46.51.130.13:4730']) # 46.51.130.13 :- ip address of client
def task_listener_reverse(gearman_worker, gearman_job):
print('Reversing string: ' + gearman_job.data)
return gearman_job.data[::-1]
# gm_worker.set_client_id is optional
gm_worker.set_client_id('python-worker')
gm_worker.register_task('reverse', task_listener_reverse)
# Enter our work loop and call gm_worker.after_poll() after each time we timeout/see socket activity
gm_worker.work()
Ran gearmand using below command on both the instance:
sudo gearmand --listen=0.0.0.0 -d
Please suggest what's wrong on above method/code.
The text was updated successfully, but these errors were encountered:
I have two aws ec2 instances. Client is running on first ec2 instance and worker is running on second ec2 instance. But worker on second ec2 instance is not responding to clients job and not even throwing any error.
client.py:
worker.py:
Ran gearmand using below command on both the instance:
Please suggest what's wrong on above method/code.
The text was updated successfully, but these errors were encountered: