Task #3184
Updated by amacdona@redhat.com almost 7 years ago
The current implementation of the publishing task starts an outer transaction. This is undesirable because:
* Long running transactions can accumulate DB locks which can result in contention.
* Could exceed DB limitations on rollback segement.
* Prevents progress reports from being committed.
The following line needs to be removed:
<pre>
with transaction.atomic():
</pre>
Without the outer transaction, the publication will be committed _half-baked_. There needs to be a way to prevent the publication from being used before it is completely constructed. Here is a recap of a list design discussion:
* Add an attribute called 'complete' to Publication which defaults to False.
* Update the viewset so that it excludes Publications that have complete=False
* Update the filterset for Publications to also exclude Publications that have complete=False
* After the plugin code returns control to core, have core set complete=True on the Publication and then call save() just before exiting.