I get the following error , how to set priority
Closed this issue · 11 comments
[2019-01-28 20:51:37] Looking for Job ...
Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'priority' in 'order clause'
#0 /var/www/html/projects/lib/Cake/Model/Datasource/DboSource.php(460): PDOStatement->execute(Array)
#1 /var/www/html/projects/lib/Cake/Model/Datasource/DboSource.php(426): DboSource->_execute('SELECT QueuedT...', Array) #2 /var/www/html/projects/lib/Cake/Model/Datasource/DboSource.php(670): DboSource->execute('SELECT
QueuedT...', Array, Array)
#3 /var/www/html/projects/lib/Cake/Model/Datasource/DboSource.php(1081): DboSource->fetchAll('SELECT `QueuedT...', false)
#4 /var/www/html/projects/lib/Cake/Model/Model.php(2696): DboSource->read(Object(QueuedTask), Array)
#5 /var/www/html/projects/app/Plugin/Queue/Model/QueuedTask.php(171): Model->find('all', Array)
#6 /var/www/html/projects/app/Plugin/Queue/Console/Command/QueueShell.php(205): QueuedTask->requestJob(Array, NULL)
#7 /var/www/html/projects/lib/Cake/Console/Shell.php(389): QueueShell->runworker()
#8 /var/www/html/projects/lib/Cake/Console/ShellDispatcher.php(200): Shell->runCommand('runworker', Array)
#9 /var/www/html/projects/lib/Cake/Console/ShellDispatcher.php(68): ShellDispatcher->dispatch()
#10 /var/www/html/projects/app/Console/cake.php(37): ShellDispatcher::run(Array)
#11 {main}
42S22%
Did you run the migrations?
Each deployment of pulled updates should contain those in the deployment script.
Thanks that is fixed now I have the following issue
Where do I get the tools plugin, because it says the tools plugin is missing.
I am using cakephp
Tools is optional, see composer.json
Why do you need it?
Please see e085545
Here is the problem i am trying to send email through queue tasks using Smtp configurations
I am using cakephp, The email gets triggerd from controller function by triggering with function path url but from queue is not able to trigger that controller function to send the email
The resposne when the worker is run is "Job did not finish, requeued.
"
No email recieved too.
public function run($data, $id = null) {
$external = new ExternalDiscussionsController();
$external->Externalsending();
}
This is how I am calling my controller from queue task
public function Externalsending(){
$this->autoRender=false;
$this->Email->smtpOptions = array(
'port'=>'portnumber',
'timeout'=>'timeoutvalue',
'host' => 'ssl://smtp.gmail.com',
'username' => 'usernamehere',
'password' => 'passwordhere',
);
$this->Email->subject="This works";
$this->Email->delivery = 'smtp';
$this->Email->to = 'toemailaddress'; // cooment this on live server
$email='fromemailaddress';
$this->Email->from =$email ;
$this->Email->send("my message");
}
This is my controller function Externalsending();
This does not require tools: https://github.com/dereuromark/cakephp-queue/blob/master/src/Shell/Task/QueueEmailTask.php#L139
It falls back to core here.. You can also manually configure it as shown in code.
This is a user issue, not a bug. I will close this then.
@dereuromark How do you run the migration? It's not in the docs, thanks!
It is in the docs of migrations plugin, that should be your primary source for it.
But it is also documented in this plugin: https://github.com/dereuromark/cakephp-queue/tree/master/docs
Hi
i am using old cakephp 2.10
I installed (https://github.com/dereuromark/cakephp-queue/tree/cake2) package as instructed in document.
To add table i ran cake Schema create -p Queue
now i added job in table but when i run cake Queue.Queue runworker it gives
Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'priority' in 'order clause'
#0 /home/demosite/public_html/cakephp2/lib/Cake/Model/Datasource/DboSource.php(489): PDOStatement->execute(Array)
#1 /home/demosite/public_html/cakephp2/lib/Cake/Model/Datasource/DboSource.php(455): DboSource->_execute('SELECT QueuedT...', Array) #2 /home/demosite/public_html/cakephp2/lib/Cake/Model/Datasource/DboSource.php(702): DboSource->execute('SELECT
QueuedT...', Array, Array)
#3 /home/demosite/public_html/cakephp2/lib/Cake/Model/Datasource/DboSource.php(1213): DboSource->fetchAll('SELECT `QueuedT...', Array)
#4 /home/demosite/public_html/cakephp2/lib/Cake/Model/Model.php(3040): DboSource->read(Object(QueuedTask), Array)
#5 /home/demosite/public_html/cakephp2/lib/Cake/Model/Model.php(3012): Model->_readDataSource('all', Array)
#6 /home/demosite/public_html/cakephp2/app/Plugin/Queue/Model/QueuedTask.php(173): Model->find('all', Array)
#7 /home/demosite/public_html/cakephp2/app/Plugin/Queue/Console/Command/QueueShell.php(205): QueuedTask->requestJob(Array, NULL)
#8 /home/demosite/public_html/cakephp2/lib/Cake/Console/Shell.php(459): QueueShell->runworker()
#9 /home/demosite/public_html/cakephp2/lib/Cake/Console/ShellDispatcher.php(219): Shell->runCommand('runworker', Array)
#10 /home/demosite/public_html/cakephp2/lib/Cake/Console/ShellDispatcher.php(66): ShellDispatcher->dispatch()
#11 /home/demosite/public_html/cakephp2/app/Console/cake.php(47): ShellDispatcher::run(Array)
#12 {main}
Do i need to run migration? as i am using old plugin and created tables as instructed.