Open ernany opened 8 years ago
No it is not saved right now. Listen Closely main feature is to associate messaging clients/agents routing messages. Sending messages is not main feature. However if you are using whatsapp backend you can add some store layer like this https://github.com/jlmadurga/yowlayer-django-store
I'm trying to use the following story layer instructions, can you explain me better?
The listenclosely integration for whatsapp uses yowsup-celery. Check the docs: https://yowsup-celery.readthedocs.io/en/latest/usage.html
You can add layers to the yowsup stack. Add yowsup-store-layer.
app.conf.update(
TOP_LAYERS=('yowsup_ext.layers.store.layer.YowStorageLayer',)
)
enter the celery.py in demo_app still did not work need anything else?
celery -A teste worker -P gevent -c 2 -l info --yowconfig teste/conf_wasap /root/virtualenvs/teste/local/lib/python2.7/site-packages/celery/platforms.py:812: RuntimeWarning: You are running the worker with superuser privileges, which is absolutely not recommended!
Please specify a different user using the -u option.
User information: uid=0 euid=0 gid=0 egid=0
uid=uid, euid=euid, gid=gid, egid=egid,
Traceback (most recent call last):
File "/root/virtualenvs/teste/bin/celery", line 11, in
It seems you dont have yowsup-store-layer installed or added to INSTALLED_APPS El 31 may. 2016 15:09, "ernany" notifications@github.com escribió:
celery -A teste worker -P gevent -c 2 -l info --yowconfig teste/conf_wasap /root/virtualenvs/teste/local/lib/python2.7/site-packages/celery/platforms.py:812: RuntimeWarning: You are running the worker with superuser privileges, which is absolutely not recommended!
Please specify a different user using the -u option.
User information: uid=0 euid=0 gid=0 egid=0
uid=uid, euid=euid, gid=gid, egid=egid, Traceback (most recent call last): File "/root/virtualenvs/teste/bin/celery", line 11, in sys.exit(main()) File "/root/virtualenvs/teste/local/lib/python2.7/site-packages/celery/ main.py", line 30, in main main() File "/root/virtualenvs/teste/local/lib/python2.7/site-packages/celery/bin/celery.py", line 81, in main cmd.execute_from_commandline(argv) File "/root/virtualenvs/teste/local/lib/python2.7/site-packages/celery/bin/celery.py", line 793, in execute_from_commandline super(CeleryCommand, self).execute_from_commandline(argv))) File "/root/virtualenvs/teste/local/lib/python2.7/site-packages/celery/bin/base.py", line 311, in execute_from_commandline return self.handle_argv(self.prog_name, argv[1:]) File "/root/virtualenvs/teste/local/lib/python2.7/site-packages/celery/bin/celery.py", line 785, in handle_argv return self.execute(command, argv) File "/root/virtualenvs/teste/local/lib/python2.7/site-packages/celery/bin/celery.py", line 717, in execute ).run_from_argv(self.prog_name, argv[1:], command=argv[0]) File "/root/virtualenvs/teste/local/lib/python2.7/site-packages/celery/bin/worker.py", line 179, in run_from_argv return self(_args, _options) File "/root/virtualenvs/teste/local/lib/python2.7/site-packages/celery/bin/base.py", line 274, in call ret = self.run(_args, _kwargs) File "/root/virtualenvs/teste/local/lib/python2.7/site-packages/celery/bin/worker.py", line 212, in run state_db=self.node_format(state_db, hostname),
_kwargs File "/root/virtualenvs/teste/local/lib/python2.7/site-packages/celery/worker/init.py", line 100, in init self.setup_instance(_self.prepare_args(*
_kwargs)) File "/root/virtualenvs/teste/local/lib/python2.7/site-packages/celery/worker/init.py", line 141, in setup_instance self.blueprint.apply(self, _kwargs) File "/root/virtualenvs/teste/local/lib/python2.7/site-packages/celery/bootsteps.py", line 215, in apply step = S(parent, _kwargs) File "/root/virtualenvs/teste/local/lib/python2.7/site-packages/yowsupcelery/steps.py", line 61, in *init worker.app.stack = YowsupStack(credentials, not unmoxie, self.
_get_top_layers(worker)) File "/root/virtualenvs/teste/local/lib/python2.7/site-packages/yowsup_celery/steps.py", line 17, in get_top_layers top_layer = import_string(top_layer_string) File "/root/virtualenvs/teste/local/lib/python2.7/site-packages/yowsup_celery/utils.py", line 16, in import_string module = import_module(module_path) File "/usr/lib/python2.7/importlib/_init.py", line 37, in import_module import(name) ImportError: No module named yowsup_ext.layers.store.layer Exception KeyError: KeyError(140576878230576,) in ignored
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jlmadurga/listenclosely/issues/2#issuecomment-222682897, or mute the thread https://github.com/notifications/unsubscribe/AEePKu-tf67s-wa9iGGlNZkfo4oIPsCMks5qHDL6gaJpZM4Io8NM .
Thank was flat, is now running but does not save anything on the base.
I am using this example: from future import absolute_import
from yowsup_celery.celery import YowCelery
from yowsup_celery import tasks
import yowlayer_store
"""
Example of worker execution using gevent pool and two concurrent worker threads. With whatsapp configuration file
in example/conf_wasa
$ celery -A example worker -P gevent -c 2 -l info --yowconfig example/conf_wasap
You can see the new worker options: celery -A example worker --help
--yowconfig=CONFIG Path to config file containing authentication info. --yowlogin=phone:b64password WhatsApp login credentials, in the format phonenumber:password, where password is base64 encoded. --yowunmoxie Disable E2E Encryption
"""
app = YowCelery('teste', broker='amqp://',
include=['yowsup_celery.tasks'])
app.conf.update(
TOP_LAYERS=('yowsup_ext.layers.store.layer.YowStorageLayer',) ,
YOWSUPCONFIG='teste/conf_wasap'
)
tasks.connect.delay()
tasks.listen.delay()
sorry for the inconvenience
when sending message not saved in the bank? I am using tasks.send_message.delay ('5511XXXXXXXX', msg)