Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vgwort
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
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
project
vgwort
Commits
ae62b1d5
Verified
Commit
ae62b1d5
authored
1 year ago
by
Alex Pott
Committed by
Alex Pott
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3374295
by alexpott: drush vgwort:send produces an error
parent
bf31966c
No related branches found
Branches containing commit
Tags
2.0.0-beta6
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/EntityJobMapper.php
+8
-1
8 additions, 1 deletion
src/EntityJobMapper.php
tests/src/Kernel/RegistrationNotificationJobTypeTest.php
+2
-1
2 additions, 1 deletion
tests/src/Kernel/RegistrationNotificationJobTypeTest.php
with
10 additions
and
2 deletions
src/EntityJobMapper.php
+
8
−
1
View file @
ae62b1d5
...
...
@@ -79,9 +79,16 @@ final class EntityJobMapper {
throw
new
\LogicException
(
sprintf
(
'The revision ID must be supplied when marking %s entities as successfully sent to VG Wort'
,
$entity_type
));
}
// If the job has been created outside of the advanced queue module it will
// not have an ID. In this case assign an ID of 0 so we can still save the
// map although no job with that ID will ever exist in advanced queue. This
// allows drush to send an individual entity to VG Wort outside of the full
// queue system.
$job_id
=
$job
->
getId
()
===
''
?
0
:
$job
->
getId
();
$this
->
connection
->
merge
(
self
::
TABLE
)
->
keys
([
'entity_type'
=>
$entity_type
,
'entity_id'
=>
$entity_id
,
'counter_id'
=>
$counter_id
])
->
fields
([
'revision_id'
=>
$revision_id
,
'job_id'
=>
$job
->
getId
()
,
'success_timestamp'
=>
$success_timestamp
])
->
fields
([
'revision_id'
=>
$revision_id
,
'job_id'
=>
$job
_id
,
'success_timestamp'
=>
$success_timestamp
])
->
execute
();
return
$this
;
}
...
...
This diff is collapsed.
Click to expand it.
tests/src/Kernel/RegistrationNotificationJobTypeTest.php
+
2
−
1
View file @
ae62b1d5
...
...
@@ -140,7 +140,7 @@ class RegistrationNotificationJobTypeTest extends VgWortKernelTestBase {
->
save
();
$this
->
handler
->
append
(
new
Response
());
$job
=
RegistrationNotification
::
createJob
(
$this
->
entity
);
$job
->
setId
(
'1'
);
$result
=
$this
->
processJob
(
$job
);
$this
->
assertSame
(
Job
::
STATE_SUCCESS
,
$result
->
getState
());
$this
->
assertSame
(
''
,
$result
->
getMessage
());
...
...
@@ -163,6 +163,7 @@ class RegistrationNotificationJobTypeTest extends VgWortKernelTestBase {
->
save
();
$this
->
handler
->
append
(
new
Response
());
$result
=
$this
->
processJob
(
$job
);
$this
->
assertSame
(
''
,
$job
->
getId
());
$this
->
assertSame
(
Job
::
STATE_SUCCESS
,
$result
->
getState
());
/** @var \GuzzleHttp\Psr7\Request $request */
$request
=
$this
->
history
[
1
][
'request'
];
...
...
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