Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
anis-next
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
anis
anis-next
Commits
c48bfcab
Commit
c48bfcab
authored
2 years ago
by
François Agneray
Browse files
Options
Downloads
Patches
Plain Diff
Fixed: Rmq close connection
parent
ff311e77
No related branches found
No related tags found
1 merge request
!72
Develop
Pipeline
#9061
passed
2 years ago
Stage: trigger-child-pipelines
Pipeline: anis-next
#9062
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/src/Action/StartTaskCreateArchiveAction.php
+8
-2
8 additions, 2 deletions
server/src/Action/StartTaskCreateArchiveAction.php
with
8 additions
and
2 deletions
server/src/Action/StartTaskCreateArchiveAction.php
+
8
−
2
View file @
c48bfcab
...
@@ -127,15 +127,21 @@ final class StartTaskCreateArchiveAction extends AbstractAction
...
@@ -127,15 +127,21 @@ final class StartTaskCreateArchiveAction extends AbstractAction
// Publish message in the archive queue
// Publish message in the archive queue
$channel
=
$this
->
rmq
->
channel
();
$channel
=
$this
->
rmq
->
channel
();
$channel
->
queue_declare
(
'archive'
,
false
,
false
,
false
,
false
);
$channel
->
queue_declare
(
'archive'
,
false
,
false
,
false
,
false
);
$
msg
=
new
AMQPMessage
(
json_encode
(
array
(
$
content
=
json_encode
(
array
(
'archive_id'
=>
$archiveId
,
'archive_id'
=>
$archiveId
,
'dataset_name'
=>
$datasetName
,
'dataset_name'
=>
$datasetName
,
'query'
=>
$request
->
getUri
()
->
getQuery
(),
'query'
=>
$request
->
getUri
()
->
getQuery
(),
'param_a'
=>
$queryParams
[
'a'
],
'param_a'
=>
$queryParams
[
'a'
],
'token'
=>
$token
'token'
=>
$token
)));
));
$msg
=
new
AMQPMessage
(
$content
);
$channel
->
basic_publish
(
$msg
,
''
,
'archive'
);
$channel
->
basic_publish
(
$msg
,
''
,
'archive'
);
// Close connection
$connection
=
$channel
->
getConnection
();
$channel
->
close
();
$connection
->
close
();
// Just returns the future archive name
// Just returns the future archive name
$payload
=
json_encode
(
array
(
'archive_name'
=>
$archiveName
,
'archive_id'
=>
$archiveId
));
$payload
=
json_encode
(
array
(
'archive_name'
=>
$archiveName
,
'archive_id'
=>
$archiveId
));
$response
->
getBody
()
->
write
(
$payload
);
$response
->
getBody
()
->
write
(
$payload
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment