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 98f7cd24
authored
Jul 08, 2021
by
Евгений
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
поправил зацикливание при ошибке в АПИ
1 parent
64dc3693
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
app/Jobs/ProcessCallLimitedAPI.php
app/Jobs/ProcessCallLimitedAPI.php
View file @
98f7cd2
...
@@ -52,18 +52,18 @@ class ProcessCallLimitedAPI implements ShouldQueue//, ShouldBeUnique
...
@@ -52,18 +52,18 @@ class ProcessCallLimitedAPI implements ShouldQueue//, ShouldBeUnique
//резервируем на это количетсво
//резервируем на это количетсво
$limitId
=
$limits
->
doRezerv
(
$this
->
api
,
$objects
);
$limitId
=
$limits
->
doRezerv
(
$this
->
api
,
$objects
);
//вызываем очередь получения данных от АПИ
//туда передаем сохраненный лимит
//там уже либо будет удален, если не удастся выполнить запрос
//либо обновятся данные
dispatch
(
new
ProcessCallAPI
(
$limitId
,
$this
->
api
))
->
onQueue
(
'api'
);
}
catch
(
\Exception
$e
){
}
catch
(
\Exception
$e
){
//нет свободных баллов, замораживаем до следующего часа
//нет свободных баллов, замораживаем до следующего часа
Log
::
debug
(
$e
);
Log
::
debug
(
$e
);
$this
->
reRunHour
();
$this
->
reRunHour
();
return
;
return
;
}
}
//вызываем очередь получения данных от АПИ
//туда передаем сохраненный лимит
//там уже либо будет удален, если не удастся выполнить запрос
//либо обновятся данные
dispatch
(
new
ProcessCallAPI
(
$limitId
,
$this
->
api
))
->
onQueue
(
'api'
);
}
}
// /**
// /**
...
...
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