php - Laravel job calling class from nowhere? -


i have job in laravel project (v.4.2). used inserting data database. class named "productupdate". use amazon sqs queue service.

what makes me confuse is, when changed code in class "productupdate", seems job running using old version of class.

i deleted lines of code in class jobs can still able run ( stills inserts data).

following job class.

the file of class @ app/jobs/productupdate.php

in understanding, job class place called queue, why can still able run when deleted codes?

<?php  /**  *  here class run queued item sent sqs  *  default method use fire() **/ class productupdate {     public function fire($job, $data)     {         // disable query log         db::connection()->disablequerylog();          // set job var used across functions         $this->job = $job;          $product = product::find($productid);         if($product->product_type != 18) {             // call updater library             $updater = app::make('product\priceupdater');             $updater->update($product);           }         // done , delete         $this->success();     }      private function success()     {         $this->job->delete();     }      private function fail($messages = array())     {         log::error('job processing fail', $messages);         $this->job->delete();     } } 

your problem related cache.

run command in terminal remove cached data.

php artisan cache:clear 

other way:-

illuminate\cache\filestore has function flush, can use it:

cache::flush(); 

this link :)


Comments