Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Письменов Дмитрий Иванович
/
yourroomads
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f66a2b18
authored
Jun 16, 2021
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix use ProcessCallLimitedAPI
1 parent
49bb42cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
app/Service/Handlers/AdsHandler.php
app/Service/Requests/DirectRequest.php
app/Service/Handlers/AdsHandler.php
View file @
f66a2b1
<?php
<?php
namespace
App\Service\Handlers
;
namespace
App\Service\Handlers
;
use
App\Jobs\ProcessCallLimitedAPI
;
use
App\Service\Contract\API
;
use
App\Service\Contract\API
;
use
App\Service\Contract\APIRequest
;
use
App\Service\Contract\APIRequest
;
...
@@ -31,7 +32,7 @@ class AdsHandler
...
@@ -31,7 +32,7 @@ class AdsHandler
if
(
$offset
)
{
if
(
$offset
)
{
$this
->
request
->
next
(
$offset
);
$this
->
request
->
next
(
$offset
);
dispatch
(
new
ProcessCallLimitedAPI
(
$this
->
request
));
dispatch
(
new
ProcessCallLimitedAPI
(
$this
->
request
));
}
}
$this
->
request
->
handle
(
$this
->
response
);
$this
->
request
->
handle
(
$this
->
response
);
...
...
app/Service/Requests/DirectRequest.php
View file @
f66a2b1
...
@@ -11,7 +11,7 @@ namespace App\Service\Requests;
...
@@ -11,7 +11,7 @@ namespace App\Service\Requests;
class
DirectRequest
extends
APIRequest
class
DirectRequest
extends
APIRequest
{
{
CONST
MAX_COUNT
=
10000
;
protected
$limit
=
10000
;
protected
$max_count
=
-
1
;
protected
$max_count
=
-
1
;
private
$url
;
private
$url
;
...
@@ -32,11 +32,11 @@ class DirectRequest extends APIRequest
...
@@ -32,11 +32,11 @@ class DirectRequest extends APIRequest
{
{
if
(
!
isset
(
$this
->
params
[
'Page'
]))
{
if
(
!
isset
(
$this
->
params
[
'Page'
]))
{
$this
->
params
[
'Page'
]
=
[
$this
->
params
[
'Page'
]
=
[
'Limit'
=>
self
::
MAX_COUNT
,
'Limit'
=>
$this
->
limit
,
'Offset'
=>
$offset
'Offset'
=>
$offset
];
];
}
}
$this
->
params
[
'Page'
][
'Limit'
]
=
self
::
MAX_COUNT
;
$this
->
params
[
'Page'
][
'Limit'
]
=
$this
->
limit
;
$this
->
params
[
'Page'
][
'Offset'
]
=
$offset
;
$this
->
params
[
'Page'
][
'Offset'
]
=
$offset
;
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment