Skip to content

Commit

Permalink
[BUGFIX] ProcessQueue throws truncated incorrect decimal value (#1083)
Browse files Browse the repository at this point in the history
  • Loading branch information
xyng authored Jul 9, 2024
1 parent f7ea4a4 commit 42b99da
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Changed

### Fixed
* Prevent exception `Truncated incorrect DECIMAL value` in `crawler:processQueue` [@xyng](https://github.com/xyng)

### Deprecated

Expand Down
2 changes: 1 addition & 1 deletion Classes/Domain/Repository/QueueRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ public function unsetProcessScheduledAndProcessIdForQueueEntries(array $processI
$queryBuilder->expr()->eq('exec_time', $queryBuilder->createNamedParameter(0, Connection::PARAM_INT)),
$queryBuilder->expr()->in(
'process_id',
$queryBuilder->createNamedParameter($processIds, ArrayParameterType::INTEGER)
$queryBuilder->createNamedParameter($processIds, ArrayParameterType::STRING)
)
)
->set('process_scheduled', '0')
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/Domain/Repository/QueueRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function countExecutedItemsByProcessReturnsInteger(): void
public function countNonExecutedItemsByProcessReturnsInteger(): void
{
$process = new Process();
$process->setProcessId('1007');
$process->setProcessId('4b802fa4bd183156c47836ba9c79643b');

self::assertSame(2, $this->subject->countNonExecutedItemsByProcess($process));
}
Expand Down Expand Up @@ -273,7 +273,7 @@ public function unsetProcessScheduledAndProcessIdForQueueEntries(): void
{
$unprocessedEntriesBefore = $this->subject->countAllPendingItems() - $this->subject->countAllAssignedPendingItems();
self::assertSame(5, $unprocessedEntriesBefore);
$processIds = ['1007'];
$processIds = ['4b802fa4bd183156c47836ba9c79643b'];
$this->subject->unsetProcessScheduledAndProcessIdForQueueEntries($processIds);

$unprocessedEntriesAfter = $this->subject->countAllPendingItems() - $this->subject->countAllAssignedPendingItems();
Expand Down
6 changes: 3 additions & 3 deletions Tests/Functional/Fixtures/tx_crawler_queue.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
,1004,0,1,"asdfgh","","",0,0,"FirstConfiguration","","",0
,1005,0,0,"asdfgh","","",10,0,"SecondConfiguration","","",0
,1006,1006,2,"qwerty","","",0,0,"SecondConfiguration","","7b6919e533f334550b6f19034dfd2f81",123
,1007,1007,0,"asdfgh","","",12,0,"SecondConfiguration","","",123
,1008,1007,3,"asdfgh","","",0,0,"ThirdConfiguration","","",456
,1009,1007,4,"asdfgh","","",0,0,"ThirdConfiguration","","",789
,1007,"4b802fa4bd183156c47836ba9c79643b",0,"asdfgh","","",12,0,"SecondConfiguration","","",123
,1008,"4b802fa4bd183156c47836ba9c79643b",3,"asdfgh","","",0,0,"ThirdConfiguration","","",456
,1009,"4b802fa4bd183156c47836ba9c79643b",4,"asdfgh","","",0,0,"ThirdConfiguration","","",789
,1015,0,5,"dvorak","","",0,12,"FirstConfiguration","","",0
,1016,1016,16,"dvorak","","",10,1245,"ThirdConfiguration","","",0
,1017,1017,17,"dvorak","","",20,4321,"FirstConfiguration","","",0
Expand Down

0 comments on commit 42b99da

Please sign in to comment.