diff --git a/src/app/DataMigrator/Jobs/FolderJob.php b/src/app/DataMigrator/Jobs/FolderJob.php index e9516acd..8d0a0aed 100644 --- a/src/app/DataMigrator/Jobs/FolderJob.php +++ b/src/app/DataMigrator/Jobs/FolderJob.php @@ -1,64 +1,66 @@ folder = $folder; } /** * Execute the job. * * @return void */ public function handle() { $migrator = new Engine(); $migrator->processFolder($this->folder); } /** * The job failed to process. * * @param \Exception $exception * * @return void */ public function failed(\Exception $exception) { - // TODO: Count failed jobs in the queue - // I'm not sure how to do this after the final failure (after X tries) - // In other words how do we know all jobs in a queue finished (successfully or not) - // Probably we have to set $tries = 1 + // This method is executed after all tries fail + // TODO: Queue::find($this->folder->queueId)->bumpJobsFailed(); } } diff --git a/src/app/DataMigrator/Jobs/ItemJob.php b/src/app/DataMigrator/Jobs/ItemJob.php index 15002b53..cd797487 100644 --- a/src/app/DataMigrator/Jobs/ItemJob.php +++ b/src/app/DataMigrator/Jobs/ItemJob.php @@ -1,64 +1,66 @@ item = $item; } /** * Execute the job. * * @return void */ public function handle() { $migrator = new Engine(); $migrator->processItem($this->item); } /** * The job failed to process. * * @param \Exception $exception * * @return void */ public function failed(\Exception $exception) { - // TODO: Count failed jobs in the queue - // I'm not sure how to do this after the final failure (after X tries) - // In other words how do we know all jobs in a queue finished (successfully or not) - // Probably we have to set $tries = 1 + // This method is executed after all tries fail + // TODO: Queue::find($this->item->folder->queueId)->bumpJobsFailed(); } } diff --git a/src/app/DataMigrator/Jobs/ItemSetJob.php b/src/app/DataMigrator/Jobs/ItemSetJob.php index 2af01658..890ea85f 100644 --- a/src/app/DataMigrator/Jobs/ItemSetJob.php +++ b/src/app/DataMigrator/Jobs/ItemSetJob.php @@ -1,64 +1,66 @@ set = $set; } /** * Execute the job. * * @return void */ public function handle() { $migrator = new Engine(); $migrator->processItemSet($this->set); } /** * The job failed to process. * * @param \Exception $exception * * @return void */ public function failed(\Exception $exception) { - // TODO: Count failed jobs in the queue - // I'm not sure how to do this after the final failure (after X tries) - // In other words how do we know all jobs in a queue finished (successfully or not) - // Probably we have to set $tries = 1 + // This method is executed after all tries fail + // TODO: Queue::find($this->set->folder->queueId)->bumpJobsFailed(); } }