Compare commits
No commits in common. "4f6e1e90c67356f6fd5df2531a8a8b42711efe56" and "1b2358b5a98a471d45caa7c477dc4d04e827d7b1" have entirely different histories.
4f6e1e90c6
...
1b2358b5a9
@ -41,6 +41,7 @@ final class File extends Send
|
|||||||
return $this->f->datetime->timestamp;
|
return $this->f->datetime->timestamp;
|
||||||
|
|
||||||
case 'name':
|
case 'name':
|
||||||
|
case 'size':
|
||||||
return $this->f->{$key};
|
return $this->f->{$key};
|
||||||
|
|
||||||
case 'type':
|
case 'type':
|
||||||
@ -83,8 +84,6 @@ final class File extends Send
|
|||||||
*/
|
*/
|
||||||
public function open(string $compress=''): bool
|
public function open(string $compress=''): bool
|
||||||
{
|
{
|
||||||
$this->size = $this->f->size;
|
|
||||||
|
|
||||||
// If sending file is a File::class, then our file is s3
|
// If sending file is a File::class, then our file is s3
|
||||||
if ($this->nameas && $this->f instanceof FileModel) {
|
if ($this->nameas && $this->f instanceof FileModel) {
|
||||||
$this->fd = Storage::readStream($this->f->rel_name);
|
$this->fd = Storage::readStream($this->f->rel_name);
|
||||||
|
@ -43,6 +43,9 @@ final class Tic extends Send
|
|||||||
case 'mtime':
|
case 'mtime':
|
||||||
return $this->f->datetime->timestamp;
|
return $this->f->datetime->timestamp;
|
||||||
|
|
||||||
|
case 'size':
|
||||||
|
return strlen($this->tic);
|
||||||
|
|
||||||
case 'type':
|
case 'type':
|
||||||
return ($this->ftype&0xff00)>>8;
|
return ($this->ftype&0xff00)>>8;
|
||||||
|
|
||||||
@ -64,8 +67,6 @@ final class Tic extends Send
|
|||||||
|
|
||||||
public function open(string $compress=''): bool
|
public function open(string $compress=''): bool
|
||||||
{
|
{
|
||||||
$this->size = strlen($this->tic);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ class Rescan extends Command
|
|||||||
foreach (File::select('id')
|
foreach (File::select('id')
|
||||||
->where('filearea_id',$fao->id)
|
->where('filearea_id',$fao->id)
|
||||||
->when($this->argument('file'),function($query) {
|
->when($this->argument('file'),function($query) {
|
||||||
return $query->where('name','=',$this->argument('file'));
|
return $query->where('name','=',$this->argument('days'));
|
||||||
})
|
})
|
||||||
->orderBy('datetime')
|
->orderBy('datetime')
|
||||||
->cursor() as $fo) {
|
->cursor() as $fo) {
|
||||||
|
@ -1043,20 +1043,9 @@ class Address extends Model
|
|||||||
*/
|
*/
|
||||||
public function filesWaiting(): Collection
|
public function filesWaiting(): Collection
|
||||||
{
|
{
|
||||||
return File::select('files.*')
|
return $this->file_seen()
|
||||||
->join('file_seenby',['file_seenby.file_id'=>'files.id'])
|
|
||||||
->where('address_id',$this->id)
|
|
||||||
->whereNull('files.deleted_at')
|
|
||||||
->whereNotNull('export_at')
|
|
||||||
->whereNull('sent_at')
|
->whereNull('sent_at')
|
||||||
->orderby('id')
|
->whereNotNull('export_at')
|
||||||
->with([
|
|
||||||
'filearea:id,name,domain_id',
|
|
||||||
'filearea.domain:id,name',
|
|
||||||
'fftn:id,zone_id,host_id,node_id,point_id',
|
|
||||||
'fftn.zone:id,domain_id,zone_id',
|
|
||||||
'fftn.zone.domain:id,name',
|
|
||||||
])
|
|
||||||
->get();
|
->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user