|
@@ -11,11 +11,17 @@ import redis
|
|
|
from celery.schedules import crontab
|
|
|
import celery
|
|
|
|
|
|
+from billiard import current_process
|
|
|
+
|
|
|
app = Celery('tasks', backend ='redis://172.104.92.245', broker='redis://172.104.92.245')
|
|
|
print('*****')
|
|
|
-#print(celery.utils.nodenames.default_nodename())
|
|
|
+#print(celery.utils.nodenames.gethostname())
|
|
|
+p = current_process()
|
|
|
+print(p.initargs[1].split('@')[1])
|
|
|
+
|
|
|
print('*****')
|
|
|
|
|
|
+
|
|
|
#rkey=app.request.delivery_info['routing_key']
|
|
|
|
|
|
|