Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120826305
ItemJob.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
ItemJob.php
View Options
<?php
namespace
App\DataMigrator\Jobs
;
use
App\DataMigrator\Engine
;
use
App\DataMigrator\Interface\Item
;
use
App\DataMigrator\Queue
;
use
Illuminate\Bus\Queueable
;
use
Illuminate\Contracts\Queue\ShouldQueue
;
use
Illuminate\Foundation\Bus\Dispatchable
;
use
Illuminate\Queue\InteractsWithQueue
;
use
Illuminate\Queue\SerializesModels
;
class
ItemJob
implements
ShouldQueue
{
use
Dispatchable
;
use
InteractsWithQueue
;
use
Queueable
;
use
SerializesModels
;
/** @var int The number of times the job may be attempted. */
public
$tries
=
3
;
/** @var int The number of seconds to wait before retrying the job. */
public
$backoff
=
5
;
/** @var Item Job data */
protected
$item
;
/**
* Create a new job instance.
*
* @param Item $item Item to process
*/
public
function
__construct
(
Item
$item
)
{
$this
->
item
=
$item
;
}
/**
* Execute the job.
*/
public
function
handle
()
{
$migrator
=
new
Engine
();
$migrator
->
processItem
(
$this
->
item
);
}
/**
* The job failed to process.
*/
public
function
failed
(
\Exception
$exception
)
{
// This method is executed after all tries fail
// TODO: Queue::find($this->item->folder->queueId)->bumpJobsFailed();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Apr 24, 10:53 AM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18829885
Default Alt Text
ItemJob.php (1 KB)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline