|
@@ -14,12 +14,6 @@ import celery
|
|
from billiard import current_process
|
|
from billiard import current_process
|
|
|
|
|
|
app = Celery('tasks', backend ='redis://172.104.92.245', broker='redis://172.104.92.245')
|
|
app = Celery('tasks', backend ='redis://172.104.92.245', broker='redis://172.104.92.245')
|
|
-print('*****')
|
|
|
|
-#print(celery.utils.nodenames.gethostname())
|
|
|
|
-p = current_process()
|
|
|
|
-print(p.initargs[1].split('@')[1])
|
|
|
|
-
|
|
|
|
-print('*****')
|
|
|
|
|
|
|
|
|
|
|
|
#rkey=app.request.delivery_info['routing_key']
|
|
#rkey=app.request.delivery_info['routing_key']
|
|
@@ -45,8 +39,14 @@ app.conf.beat_schedule = {
|
|
#sender task.request.hostnam
|
|
#sender task.request.hostnam
|
|
# sender.add_periodic_task(100.0, selenium_jared_click.s(), name='add every 2 min')
|
|
# sender.add_periodic_task(100.0, selenium_jared_click.s(), name='add every 2 min')
|
|
|
|
|
|
-@app.task(queue='ABC')
|
|
|
|
|
|
+@app.task()
|
|
def selenium_jared_click():
|
|
def selenium_jared_click():
|
|
|
|
+ print('*****')
|
|
|
|
+ p = current_process()
|
|
|
|
+ print(p.initargs[1].split('@')[1])
|
|
|
|
+ print('*****')
|
|
|
|
+
|
|
|
|
+
|
|
db = dataset.connect('postgresql://postgres:eyJhbGciOiJI@172.105.241.163:5432/postgres')
|
|
db = dataset.connect('postgresql://postgres:eyJhbGciOiJI@172.105.241.163:5432/postgres')
|
|
options = webdriver.ChromeOptions()
|
|
options = webdriver.ChromeOptions()
|
|
options.add_argument("--no-sandbox")
|
|
options.add_argument("--no-sandbox")
|