jared hace 1 año
padre
commit
5a3c70ffaf
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      deployment/cel_seo_click.py

+ 4 - 0
deployment/cel_seo_click.py

@@ -8,12 +8,16 @@ from selenium.webdriver.support import expected_conditions as EC
 from selenium.webdriver.common.keys import Keys
 from celery import Celery
 import redis
+import json
 from celery.schedules import crontab
 
 app = Celery('tasks', backend ='redis://172.104.92.245', broker='redis://172.104.92.245')
 
 @app.on_after_configure.connect
 def setup_periodic_tasks(sender, **kwargs):
+    print(app.request.delivery_info['routing_key'])
+    json_str = json.dumps(sender, indent=4)
+    #sender task.request.hostnam
     sender.add_periodic_task(100.0, selenium_jared_click.s(), name='add every 2 min')
 
 @app.task