Skip to content

fix(SUP-50789): Fix Sync Method Used Credit - #13889

Open
yambenari24 wants to merge 3 commits into
Venus-22.17.0from
Venus-22.17.0-SUP-50789
Open

fix(SUP-50789): Fix Sync Method Used Credit#13889
yambenari24 wants to merge 3 commits into
Venus-22.17.0from
Venus-22.17.0-SUP-50789

Conversation

@yambenari24

Copy link
Copy Markdown
Contributor

Pull Request Checklist

Please complete the following before submitting:

General notes -

  • I have tested the changes locally.
  • I have written unit tests where applicable.
  • I have updated documentation where needed.
  • I have added comments to complex code.
  • This PR follows the coding style guidelines.
  • I have updated release notes with new feature

New Kaltura Types

  • I have created new clients
  • I have notified related apps - KMCNG / KMS / EP .... about new clients

New Kaltura Services / Actions

  • I have added a deployment script

Questions

  1. What is the purpose of this PR?

    • Enter your answer here
  2. Does this change affect production code or infrastructure?

    • Yes
    • No
  3. If yes, what is the rollback plan?

    • Enter your answer here

@github-actions

github-actions Bot commented Apr 5, 2026

Copy link
Copy Markdown

@github-copilot suggest

$queueC->add(EntryVendorTaskPeer::PRICE, 0, Criteria::NOT_EQUAL);
$queueC->add(EntryVendorTaskPeer::STATUS, [EntryVendorTaskStatus::PENDING, EntryVendorTaskStatus::PROCESSING, EntryVendorTaskStatus::READY], Criteria::IN);
$queueC->add(EntryVendorTaskPeer::QUEUE_TIME, $syncStartDate, Criteria::GREATER_EQUAL);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this $this->addAdditionalCriteria($c); was deleted?

{
$totalUsedCredit += $totalPrice;
}
return $totalUsedCredit;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why deleted these 2 lines?
$this->setSyncedCredit($totalUsedCredit);
$this->setLastSyncTime($now);

if ($dbVendorCatalogItem)
{
$object_to_fill->setIsPayPerUse($dbVendorCatalogItem->getPayPerUse());
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to add Default value to the setIsPayPerUse
else
{
$object_to_fill->setIsPayPerUse(false); // Default value
}
@MosheMaorKaltura WDYT?

@github-actions

github-actions Bot commented Apr 9, 2026

Copy link
Copy Markdown

@github-copilot suggest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants