How to use on_message? in pyspider

url
on_messagemsgon_message
print msg,message
   

clipboard.png

def detail_page(self, response):
    results = json.loads(response.text)
    for result in results:
        date = result["date"]
        number = response.url[6:]
        self.send_message(self.project_name, {
            "number": number,
            "date":date,
         }, url="%s-sharp%s" % (response.url, date))
 
def on_message(self, project, msg):
    print msg
    return msg
Nov.19,2021

I don't know how to design it, and on_message will not be called during testing.
but changing the project to the running runtime is called
if it doesn't work, it shouldn't be the problem with this code.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea932e-1f38.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea932e-1f38.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?