Page MenuHomePhorge

Update createjob result immediately and not after sending the mail.
ClosedPublic

Authored by knauss on Jun 8 2015, 3:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 10, 7:56 PM
Unknown Object (File)
Mar 24 2024, 7:58 PM
Unknown Object (File)
Mar 22 2024, 8:27 PM
Unknown Object (File)
Mar 11 2024, 3:32 AM
Unknown Object (File)
Feb 10 2024, 2:37 AM
Unknown Object (File)
Feb 6 2024, 8:17 PM
Unknown Object (File)
Feb 3 2024, 2:50 PM
Unknown Object (File)
Jan 29 2024, 9:27 PM
Subscribers

Details

Summary

If we create an exception from a events series, we also start an atomic
operation. createIncidence sends mails to attendees; the transistionJob
is finished before handleCreateJobResult2 is triggered.

With handleCreateJob we react on the correct end of createJob, so we
should also update the status of the job inside the atomicOperation.

Diff Detail

Branch
dev/invitations
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

knauss updated this revision to Diff 21.
knauss retitled this revision from to Update createjob result immediately and not after sending the mail..
knauss updated this object.
knauss added a reviewer: mollekopf.
knauss added a subscriber: KDE PIM.

remove kWarning

mollekopf edited edge metadata.

The change is fine I guess, but the description doesn't make any sense. There is no handleCreateJob2 or a transitionJob, so I don't really know what this patch is about.

If you're confident this fixes something then go ahead and write a better commit message please.

This revision is now accepted and ready to land.Jun 8 2015, 5:46 PM
knauss edited edge metadata.

If we create an exception from a events series, we also start an atomic
operation and createIncidence will send mails to attendees.
The mail triggers the finish of Akonadi::TransactionSequence
(handleTransactionJobResult) of the atomic operation
before handleCreateJobResult2 is executed. That made the job not been
marked as finished, when the handleTransactionJobResult was called. And
made handleTransactionJobResult to fail, because it checks if all
subjobs are executed:

Q_ASSERT(!operation->pendingJobs());

If we update the job result directly in the result function
(handleCreateJob) of the createJob and not after sending the mail, than the
status is uptodate when handleTransactionJobResult is called. All other
types of handlers (modify and delete) do it the same way.