-
Notifications
You must be signed in to change notification settings - Fork 17
Bulk api status #6
Bulk api status #6
Conversation
…bulk api statuses
|
||
/** | ||
* @api | ||
* @since 100.3.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to put @since
annotation, it will be added automatically by release publication tools.
* @api | ||
* @since 100.3.0 | ||
*/ | ||
interface BulkRepositoryInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not look like repository, which usually has CRUD operations. How about BlulkStatusInterface
? Then methods could be named getStatus
and getDetailedStatus
.
* @api | ||
* @since 100.3.0 | ||
*/ | ||
interface ShortInterface extends BulkSummaryInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interfaces could be renamed to Api/Data/BulkStatusInterface
and Api/Data/DetailedBulkStatusInterface
* @return \Magento\AsynchronousOperations\Api\Data\OperationDetailsInterface|null | ||
* @since 100.3.0 | ||
*/ | ||
public function getOperationsCounter(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not clear why counter type is OperationDetailedInterface
use Magento\AsynchronousOperations\Api\Data\BulkSummaryInterface; | ||
|
||
/** | ||
* Interface BulkStatusInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add proper description for all classes/interfaces, especially @api
ones.
* @return int | ||
* @since 100.3.0 | ||
*/ | ||
public function getOperationsTotal(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getTotalCount
?
public function getOperationsTotal(); | ||
|
||
/** | ||
* Open operations count |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please correct description
* @return int | ||
* @since 100.3.0 | ||
*/ | ||
public function getOperationsSuccessful(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getSuccessfulCount
?
* @return int | ||
* @since 100.3.0 | ||
*/ | ||
public function getTotalFailed(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getFailedCount
? And same pattern for the rest of the operations in the interface.
/** | ||
* Upgrade the AsynchronousOperations module DB scheme | ||
*/ | ||
class UpgradeSchema implements UpgradeSchemaInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New modules should have InstallSchema, not UpgradeSchema
…interfaces and methods
[Forwardport] Fixed syntax for before-after operators in less files.
[Forwardport] Translated validation error messages
2.3-develop branch upadate
Update 2.3-develop branch
Current Pull Request will add Status API functionality for module AsynchronousOperations.
After creating Bulk operation, Magento creates new UUID for this operation. To be able to track status of each operation was developer API.
REST api call example:
GET /V1/bulk/status-detailed/:UUID
Response will look like this:
REST api call example:
GET /V1/bulk/status-short/:UUID
Response will look like this.
Instead of get all operation entity data this resource give just operation status (e.g. without result_serialized_data, topic_name or extension_attributes):
Contribution checklist