fix(SUP-51410): Add fileProcessingGracePeriod to a per-drop-folder setting#13831
fix(SUP-51410): Add fileProcessingGracePeriod to a per-drop-folder setting#13831yambenari24 wants to merge 11 commits intoVenus-22.15.0from
Conversation
…etting to a per-drop-folder setting
|
@github-copilot suggest |
|
@github-copilot suggest |
|
@github-copilot suggest |
|
@github-copilot suggest |
|
@github-copilot suggest |
|
@github-copilot suggest |
|
@github-copilot suggest |
|
@github-copilot suggest |
|
@github-copilot suggest |
| $fileProcessingGracePeriodValue = $this->fileProcessingGracePeriod; | ||
|
|
||
| // Convert to integer if it's a numeric string | ||
| if (is_string($fileProcessingGracePeriodValue) && is_numeric($fileProcessingGracePeriodValue)) { |
There was a problem hiding this comment.
coding convension - { in a new line
| */ | ||
| public function getFileProcessingGracePeriod() | ||
| { | ||
| return $this->getFromCustomData(self::CUSTOM_DATA_FILE_PROCESSING_GRACE_PERIOD); |
There was a problem hiding this comment.
If value was not set return default value
|
|
||
|
|
||
|
|
||
| // Convert to integer if it's a numeric string |
There was a problem hiding this comment.
The insertion / update login should not happen here but in KalturaZoomDropFolder toInsertableObject and toUpdatableObject .....
| * The amount of time, in seconds, to wait before processing a drop folder file | ||
| * @var int | ||
| */ | ||
| public $fileProcessingGracePeriod; |
There was a problem hiding this comment.
This feature is only relevant for Zoom, lets keep it only there
| } | ||
|
|
||
| // Set default if empty | ||
| if (is_null($fileProcessingGracePeriodValue) || $fileProcessingGracePeriodValue === '' || $fileProcessingGracePeriodValue === 0) { |
There was a problem hiding this comment.
validations are done in validateForInsert or validateForUpdate
| // (parent may not recognize this property due to reflection cache) | ||
| if ($this->shouldGet('fileProcessingGracePeriod', $responseProfile)) | ||
| { | ||
| $this->fileProcessingGracePeriod = $source_object->getFileProcessingGracePeriod(); |
There was a problem hiding this comment.
why is this needed if the param fileProcessingGracePeriod is mapped to explicit core object function getFileProcessingGracePeriod()
| $dropFolder->validatePropertyNotNull('path'); | ||
| $dropFolder->validatePropertyNotNull('partnerId'); | ||
| $dropFolder->validatePropertyMinValue('fileSizeCheckInterval', 0, true); | ||
| $dropFolder->validatePropertyMinValue('fileProcessingGracePeriod', 0, true); |
| * The amount of time, in seconds, to wait before processing a drop folder file | ||
| * @var int | ||
| */ | ||
| public $fileProcessingGracePeriod; |
There was a problem hiding this comment.
If you want to validate min max values you can use annotations
Pull Request Checklist
Please complete the following before submitting:
General notes -
New Kaltura Types
New Kaltura Services / Actions
Questions
What is the purpose of this PR?
Does this change affect production code or infrastructure?
If yes, what is the rollback plan?