Closed iannsp closed 2 months ago
Make bulk updates.
Pipefy Recomendations:
this feature also increase the result application performance.
The normal mode is execute each gql as soon requested but in this mode they are put in bulks and use the notation:
mutation{ [lineID] : [gql ] }
Pipefy::bulkStart() Open the bulk to write
Pipefy::bulkEnd() Close the bulk for write
Pipefy::bulkscript() return the bulk gql script.
Pipefy::bulkExecute() Execute the bulk request.
Pipefy::bulkResult() Return the state of each gql in the bulk after execute. Used to check for success or failure.
You need to check for cards in the Pipe that are more than three days overdue and write a comment remember the assignee avbout the task.
$cards = new Clientedigital\Pipefy\Pipe([PipeID])->Cards(); $lastUpdateDate = (new DateTime())->sub(new DateInterval('P3D')); $filter= new Clientedigital\Pipefy\Filter\Cards(); $filter->by('due_date', '<', $lastUpdateDate ); $cards->filter($filter); // return the generator. $cards = $cards->get(); Pipefy::bulkStart(); foreach($cards as $card){ $cards->update( ($card->get()) ->addComment('Hi, This card is 3 days late. Please check the task.') ); } Pipefy::bulkEnd(); try{ Pipefy::bulkExecute(); } catch(\Exception $except){ $log->info('Some error in bulk mutation'); }
um tipo de GQL // pode ser passado para GraphQL ->Exec(GQLInterface) Somente mutations ocorrem em Bulk.
capacity became info
Make bulk updates.
Pipefy Recomendations:
this feature also increase the result application performance.
The normal mode is execute each gql as soon requested but in this mode they are put in bulks and use the notation:
Pipefy::bulkStart() Open the bulk to write
Pipefy::bulkEnd()
Close the bulk for write
Pipefy::bulkscript() return the bulk gql script.
Pipefy::bulkExecute() Execute the bulk request.
Pipefy::bulkResult() Return the state of each gql in the bulk after execute. Used to check for success or failure.
Use Case
You need to check for cards in the Pipe that are more than three days overdue and write a comment remember the assignee avbout the task.