Need some help to avoid ConflictError
'Jürgen Gmach' via zodb <[email protected]> Thu, 23 May 2019 08:04:00 -0700 (PDT)
| Newsgroups | gmane.comp.web.zope.zodb |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_481_530351181.1558623840727
Content-Type: multipart/alternative;
boundary="----=_Part_482_41524778.1558623840730"
------=_Part_482_41524778.1558623840730
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
*Setting*
- a software license management system based on Zope 2.13.29 / Python=20
2.7.15 / ZEO / ZODB3 =3D 3.10.5
- one off script which upgrades roundabout 2000 software licenses + creates=
=20
delivery notes (pdf) + updates company data + create build infos (for the=
=20
software) and packs everything in a zip file (called zil) for further=20
processing
- script gets triggered via browser.
*Test run on dev machine*
On my dev machine script ran without a problem.
*first test run on staging*
On staging the script ran completely - than hit a *ConflictError* at the=20
very end, and started again right from the beginning (one request =3D one=
=20
transaction).
2019-05-17T15:34:34 INFO ZPublisher.Conflict ConflictError at /CompanyCente=
r
/perform_mass_delivery: database conflict error (oid 0x6c8a1d, class BTrees=
.
OOBTree.OOBucket, serial this txn started with 0x03cfc5fb1c25c788 2019-05-1=
7=20
12:43:06.597088, serial currently committed 0x03cfc6232ad84677 2019-05-17 1=
3
:23:10.041756) (1 conflicts (0 unresolved) since startup at Thu May 16 11:2=
4
:35 2019)
*second test run on staging*
For the next test run, I put a *transaction.commit()* after each license=20
upgrade.
After about the half of the licenses, another* ConflictError* occured, but=
=20
this time the same license got retried, worked, and then also the rest of=
=20
the licenses got upgraded.
At the same time the *ConflictError* occured, also a long running cron job=
=20
via XML-RPC was triggered - which does not act on licenses, but on Calendar=
=20
data, so I am unsure whether this caused the problem.
2019-05-17T17:03:11 INFO ZPublisher.Conflict ConflictError at /CompanyCente=
r
/perform_mass_delivery: database conflict error (oid 0x6cc634, class BTrees=
.
OOBTree.OOBucket, serial this txn started with 0x03cfc68726d9b288 2019-05-1=
7=20
15:03:09.105558, serial currently committed 0x03cfc687300f5311 2019-05-17 1=
5
:03:11.264030) (5 conflicts (1 unresolved) since startup at Fri May 17 16:3=
5
:08 2019)
When I had a look at the oid, I got a *BTrees.OOBTree.OOBucket* - without=
=20
deeper knowledge at first I expected to get a business object like a=20
license or a company or ... which was tried to write on twice.
The bucket contains...
[('C2WGKES3NZBI', 'DeliveryNotePDF'), ('C2WGKES4VDVZ', 'BillingPdfPart'), (
'C2WGKEWEYHYI', 'Licence'), ('C2WGKEWF6UNI', 'LicenseProfile'), (
'C2WGKEWGVXYG', 'DeliveryNotePDF'), ('C2WGKEWIHBW4', 'BillingPdfPart'), (
'C2WGKFA26DPJ', 'BillingPdfPart'), ('C2WGKFAY22TM', 'Licence'), (
'C2WGKFAZMYZM', 'LicenseProfile'), ('C2WGKFAZVBHH', 'DeliveryNotePDF'), (
'C2WGKFEFYQCI', 'Licence'), ('C2WGKFEGMMVU', 'LicenseProfile'), (
'C2WGKFEGUFEK', 'DeliveryNotePDF'), ('C2WGKFEIFTFG', 'BillingPdfPart'), (
'C2WGKFIS5NHJ', 'Licence')]
The zero index of the tuples are custom identifiers.
*one off script*
def perform_mass_delivery(self):
"""This method gets triggered by the browser."""
ziller_log.info("beginning zil generation")
licenses =3D self.db.Licenses.get_licenses_for_update()
self._process_all_licenses(licenses)
return "Success!"
def _process_all_licenses(self, licenses):
ziller_log.info("licenses to be updated: %s" % len(licenses))
for i, license in enumerate(licenses):
ziller_log.info("about updating license no %s of %s" % (i, len(
licenses)))
self._try_zil_generation(license)
# best place for transaction.commit?
@staticmethod
def _try_zil_generation(license):
try:
# a lot is going on in generate_zil_for_initial_deliery
# including the zip file generation - which is not covered by=
=20
the transaction
file_name, successor =3D license.generate_zil_for_initial_deliv=
ery
()
except Exception:
ziller_log.error("license: " + license.getId(), exc_info=3DTrue=
)
else:
ziller_log.info("license: " + license.getId() + " successfully=
=20
updated")
ziller_log.info("location of ziller file: %s" % file_name)
ziller_log.info("successor: %s" % successor.getId())
*Many questions..... (as I really, really want to understand what's going=
=20
on)*
1. Why did the ConflictError in the first test run happen exactly at the=20
end of the run? Coincidence?
2. Why do I get an OOBucket from an oid and not a business object - like a=
=20
single license?
3. What exactly does the ConflictError mean? Problem when writing to the=20
bucket or writing to a single business object?
4. Is it common that a bucket contains so many objects? I always thought a=
=20
good "hash table" contains one or zero values for a given key.
5. Where exactly did the ConflictError occur? Unfortunately there is no=20
line number in the traceback.
7. When I look at my code again, I also think that "except Exception" is a=
=20
bad decision. Should I at least catch ConflictError and re-raise?
8. Iff the `except Exception` would have caught the above ConflictError,=20
than the log message would have to start with "license ..." - but it does=
=20
not.=20
The ConflictError gets logged as "INFO" - which line of my code triggered=
=20
that message?
9. When a ConflictError occurs the transaction gets rolled back - but the=
=20
created zil/zip file is still on disk. What is the best way to clean it up?=
=20
In the except block?
10. When I redo the 2nd test run with the same conditions, will the=20
ConflictError occur at the very same license or is this non deterministic?
11. Why does it read "1 unresolved" at the second test run, when the=20
license upgrade indeed got retried and finally resolved?
12. Why do **ConflictErrors** even occur when I am the only user?
For the production license upgrade, I plan to:
- add a transaction.commit after each license upgrade
- deactivate all cron jobs
- deactivate nginx/haproxy, so I am the only user of the application (via=
=20
lynx)
...
... any other hints/tipps/improvement suggestions for the above code or how=
=20
to proceed?
Thank you very much for your help!
J=C3=BCrgen
P.S.: This was first posted on the Plone community board - but there I got=
=20
directed there.
--=20
You received this message because you are subscribed to the Google Groups "=
zodb" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/=
zodb/ba57a33b-baae-4de1-adf2-818f113e37d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
------=_Part_482_41524778.1558623840730
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div><b>Setting</b></div><div>- a software license managem=
ent system based on Zope 2.13.29=C2=A0 / Python 2.7.15 / ZEO / ZODB3 =3D 3.=
10.5<br></div><div>- one off script which upgrades roundabout 2000 software=
licenses + creates delivery notes (pdf) + updates company data + create bu=
ild infos (for the software) and packs everything in a zip file (called zil=
) for further processing</div><div>- script gets triggered via browser.</di=
v><div><br></div><div><b>Test run on dev machine</b></div><div>On my dev ma=
chine script ran without a problem.</div><div><br></div><div><b>first test =
run on staging</b></div><div>On staging the script ran completely - than hi=
t a <b>ConflictError</b> at the very end, and started again right from the =
beginning (one request =3D one transaction).</div><div><br></div><div><br><=
/div><div class=3D"prettyprint" style=3D"background-color: rgb(250, 250, 25=
0); border-color: rgb(187, 187, 187); border-style: solid; border-width: 1p=
x; overflow-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"su=
bprettyprint"><span style=3D"color: #066;" class=3D"styled-by-prettify">201=
9</span><span style=3D"color: #660;" class=3D"styled-by-prettify">-</span><=
span style=3D"color: #066;" class=3D"styled-by-prettify">05</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">-</span><span style=3D"col=
or: #066;" class=3D"styled-by-prettify">17T15</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #066;" cla=
ss=3D"styled-by-prettify">34</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">:</span><span style=3D"color: #066;" class=3D"styled-by-p=
rettify">34</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
> INFO </span><span style=3D"color: #606;" class=3D"styled-by-prettify">ZPu=
blisher</span><span style=3D"color: #660;" class=3D"styled-by-prettify">.</=
span><span style=3D"color: #606;" class=3D"styled-by-prettify">Conflict</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span =
style=3D"color: #606;" class=3D"styled-by-prettify">ConflictError</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> at </span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">/</span><span style=3D"col=
or: #606;" class=3D"styled-by-prettify">CompanyCenter</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">/</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify">perform_mass_delivery</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> database conflict error </span><span=
style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify">oid </span><span style=3D"color=
: #066;" class=3D"styled-by-prettify">0x6c8a1d</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">class</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> </span><span style=3D"color: #606;" class=3D"styled-by-pretti=
fy">BTrees</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
.</span><span style=3D"color: #606;" class=3D"styled-by-prettify">OOBTree</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">.</span><spa=
n style=3D"color: #606;" class=3D"styled-by-prettify">OOBucket</span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> serial </span><span style=3D"co=
lor: #008;" class=3D"styled-by-prettify">this</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> txn started </span><span style=3D"color=
: #008;" class=3D"styled-by-prettify">with</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=
=3D"styled-by-prettify">0x03cfc5fb1c25c788</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=
=3D"styled-by-prettify">2019</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">-</span><span style=3D"color: #066;" class=3D"styled-by-p=
rettify">05</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>-</span><span style=3D"color: #066;" class=3D"styled-by-prettify">17</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span st=
yle=3D"color: #066;" class=3D"styled-by-prettify">12</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #06=
6;" class=3D"styled-by-prettify">43</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">:</span><span style=3D"color: #066;" class=3D"styl=
ed-by-prettify">06.597088</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> serial currently committed </span><span style=3D"color: #066;" class=
=3D"styled-by-prettify">0x03cfc6232ad84677</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=
=3D"styled-by-prettify">2019</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">-</span><span style=3D"color: #066;" class=3D"styled-by-p=
rettify">05</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>-</span><span style=3D"color: #066;" class=3D"styled-by-prettify">17</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span st=
yle=3D"color: #066;" class=3D"styled-by-prettify">13</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #06=
6;" class=3D"styled-by-prettify">23</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">:</span><span style=3D"color: #066;" class=3D"styl=
ed-by-prettify">10.041756</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">)</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</=
span><span style=3D"color: #066;" class=3D"styled-by-prettify">1</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> conflicts </span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=
=3D"color: #066;" class=3D"styled-by-prettify">0</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> unresolved</span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">)</span><span style=3D"color: #000;"=
class=3D"styled-by-prettify"> since startup at </span><span style=3D"color=
: #606;" class=3D"styled-by-prettify">Thu</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> </span><span style=3D"color: #606;" class=
=3D"styled-by-prettify">May</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"> </span><span style=3D"color: #066;" class=3D"styled-by-pr=
ettify">16</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
</span><span style=3D"color: #066;" class=3D"styled-by-prettify">11</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">:</span><span sty=
le=3D"color: #066;" class=3D"styled-by-prettify">24</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #066=
;" class=3D"styled-by-prettify">35</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"style=
d-by-prettify">2019</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">)</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
<br></span></div></code></div><div><br><br></div><div><b>second test run on=
staging</b></div><div>For the next test run, I put a <b>transaction.commit=
()</b>=C2=A0after each license upgrade.</div><div><br></div><div>After abou=
t the half of the licenses, another<b> ConflictError</b> occured, but this =
time the same license got retried, worked, and then also the rest of the li=
censes got upgraded.</div><div><br></div><div>At the same time the <b>Confl=
ictError</b> occured, also a long running cron job via XML-RPC was triggere=
d - which does not act on licenses, but on Calendar data, so I am unsure wh=
ether this caused the problem.</div><div><br></div><div><br></div><div><div=
class=3D"prettyprint" style=3D"background-color: rgb(250, 250, 250); borde=
r-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; overfl=
ow-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"subprettypr=
int"><span style=3D"color: #066;" class=3D"styled-by-prettify">2019</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">-</span><span styl=
e=3D"color: #066;" class=3D"styled-by-prettify">05</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">-</span><span style=3D"color: #066;=
" class=3D"styled-by-prettify">17T17</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">:</span><span style=3D"color: #066;" class=3D"sty=
led-by-prettify">03</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">:</span><span style=3D"color: #066;" class=3D"styled-by-prettify">=
11</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> INFO </=
span><span style=3D"color: #606;" class=3D"styled-by-prettify">ZPublisher</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">.</span><spa=
n style=3D"color: #606;" class=3D"styled-by-prettify">Conflict</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"=
color: #606;" class=3D"styled-by-prettify">ConflictError</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> at </span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">/</span><span style=3D"color: #606=
;" class=3D"styled-by-prettify">CompanyCenter</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">/</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify">perform_mass_delivery</span><span style=3D"color:=
#660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> database conflict error </span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify">oid </span><span style=3D"color: #066;" c=
lass=3D"styled-by-prettify">0x6cc634</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-pr=
ettify">class</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> </span><span style=3D"color: #606;" class=3D"styled-by-prettify">BTrees=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">.</span><s=
pan style=3D"color: #606;" class=3D"styled-by-prettify">OOBTree</span><span=
style=3D"color: #660;" class=3D"styled-by-prettify">.</span><span style=3D=
"color: #606;" class=3D"styled-by-prettify">OOBucket</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"> serial </span><span style=3D"color: #008;=
" class=3D"styled-by-prettify">this</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> txn started </span><span style=3D"color: #008;" c=
lass=3D"styled-by-prettify">with</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"style=
d-by-prettify">0x03cfc68726d9b288</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"style=
d-by-prettify">2019</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">-</span><span style=3D"color: #066;" class=3D"styled-by-prettify">=
05</span><span style=3D"color: #660;" class=3D"styled-by-prettify">-</span>=
<span style=3D"color: #066;" class=3D"styled-by-prettify">17</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"co=
lor: #066;" class=3D"styled-by-prettify">15</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">:</span><span style=3D"color: #066;" class=
=3D"styled-by-prettify">03</span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">:</span><span style=3D"color: #066;" class=3D"styled-by-pre=
ttify">09.105558</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> se=
rial currently committed </span><span style=3D"color: #066;" class=3D"style=
d-by-prettify">0x03cfc687300f5311</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"style=
d-by-prettify">2019</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">-</span><span style=3D"color: #066;" class=3D"styled-by-prettify">=
05</span><span style=3D"color: #660;" class=3D"styled-by-prettify">-</span>=
<span style=3D"color: #066;" class=3D"styled-by-prettify">17</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"co=
lor: #066;" class=3D"styled-by-prettify">15</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">:</span><span style=3D"color: #066;" class=
=3D"styled-by-prettify">03</span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">:</span><span style=3D"color: #066;" class=3D"styled-by-pre=
ttify">11.264030</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">)</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><spa=
n style=3D"color: #066;" class=3D"styled-by-prettify">5</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> conflicts </span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"colo=
r: #066;" class=3D"styled-by-prettify">1</span><span style=3D"color: #000;"=
class=3D"styled-by-prettify"> unresolved</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> since startup at </span><span style=3D"color: #606=
;" class=3D"styled-by-prettify">Fri</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> </span><span style=3D"color: #606;" class=3D"styl=
ed-by-prettify">May</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> </span><span style=3D"color: #066;" class=3D"styled-by-prettify">=
17</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span>=
<span style=3D"color: #066;" class=3D"styled-by-prettify">16</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">:</span><span style=3D"co=
lor: #066;" class=3D"styled-by-prettify">35</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">:</span><span style=3D"color: #066;" class=
=3D"styled-by-prettify">08</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> </span><span style=3D"color: #066;" class=3D"styled-by-pre=
ttify">2019</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>)</span></div></code></div></div><div><br></div><div><br></div><div>When I=
had a look at the oid, I got a <b>BTrees.OOBTree.OOBucket</b> - without de=
eper knowledge at first I expected to get a business object like a license =
or a company or ... which was tried to write on twice.</div><div><br></div>=
<div>The bucket contains...</div><div><div class=3D"prettyprint" style=3D"b=
ackground-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); bord=
er-style: solid; border-width: 1px; overflow-wrap: break-word;"><code class=
=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"color: #660;"=
class=3D"styled-by-prettify">[(</span><span style=3D"color: #080;" class=
=3D"styled-by-prettify">'C2WGKES3NZBI'</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span><span style=3D"color: #080;" class=3D"st=
yled-by-prettify">'DeliveryNotePDF'</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">),</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">(</span><span style=3D"color: #080;" class=3D"styled-by-pre=
ttify">'C2WGKES4VDVZ'</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span><span style=3D"color: #080;" class=3D"styled-by-prettify"=
>'BillingPdfPart'</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">),</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">(<=
/span><span style=3D"color: #080;" class=3D"styled-by-prettify">'C2WGKE=
WEYHYI'</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span>=
<span style=3D"color: #080;" class=3D"styled-by-prettify">'Licence'=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">),</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"colo=
r: #080;" class=3D"styled-by-prettify">'C2WGKEWF6UNI'</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #08=
0;" class=3D"styled-by-prettify">'LicenseProfile'</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">),</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;"=
class=3D"styled-by-prettify">(</span><span style=3D"color: #080;" class=3D=
"styled-by-prettify">'C2WGKEWGVXYG'</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #080;" class=3D"style=
d-by-prettify">'DeliveryNotePDF'</span><span style=3D"color: #660;"=
class=3D"styled-by-prettify">),</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">(</span><span style=3D"color: #080;" class=3D"styled-by-pret=
tify">'C2WGKEWIHBW4'</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> </span><span style=3D"color: #080;" class=3D"styled-by-prettify">=
'BillingPdfPart'</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">),</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</=
span><span style=3D"color: #080;" class=3D"styled-by-prettify">'C2WGKFA=
26DPJ'</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
span style=3D"color: #080;" class=3D"styled-by-prettify">'BillingPdfPar=
t'</span><span style=3D"color: #660;" class=3D"styled-by-prettify">),</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=
=3D"color: #080;" class=3D"styled-by-prettify">'C2WGKFAY22TM'</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"co=
lor: #080;" class=3D"styled-by-prettify">'Licence'</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">),</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">(</span><span style=3D"color: #080;" class=
=3D"styled-by-prettify">'C2WGKFAZMYZM'</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span><span style=3D"color: #080;" class=3D"st=
yled-by-prettify">'LicenseProfile'</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">),</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">(</span><span style=3D"color: #080;" class=3D"styled-by-pret=
tify">'C2WGKFAZVBHH'</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> </span><span style=3D"color: #080;" class=3D"styled-by-prettify">=
'DeliveryNotePDF'</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">),</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">(<=
/span><span style=3D"color: #080;" class=3D"styled-by-prettify">'C2WGKF=
EFYQCI'</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span>=
<span style=3D"color: #080;" class=3D"styled-by-prettify">'Licence'=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">),</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"colo=
r: #080;" class=3D"styled-by-prettify">'C2WGKFEGMMVU'</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #08=
0;" class=3D"styled-by-prettify">'LicenseProfile'</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">),</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;"=
class=3D"styled-by-prettify">(</span><span style=3D"color: #080;" class=3D=
"styled-by-prettify">'C2WGKFEGUFEK'</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #080;" class=3D"style=
d-by-prettify">'DeliveryNotePDF'</span><span style=3D"color: #660;"=
class=3D"styled-by-prettify">),</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">(</span><span style=3D"color: #080;" class=3D"styled-by-pret=
tify">'C2WGKFEIFTFG'</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> </span><span style=3D"color: #080;" class=3D"styled-by-prettify">=
'BillingPdfPart'</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">),</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</=
span><span style=3D"color: #080;" class=3D"styled-by-prettify">'C2WGKFI=
S5NHJ'</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
span style=3D"color: #080;" class=3D"styled-by-prettify">'Licence'<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">)]</span></=
div></code></div></div><div><br></div><div><br></div><div>The zero index of=
the tuples are custom identifiers.</div><div><br></div><div><b>one off scr=
ipt</b></div><div><br></div><div class=3D"prettyprint" style=3D"background-=
color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: =
solid; border-width: 1px; overflow-wrap: break-word;"><code class=3D"pretty=
print"><div class=3D"subprettyprint"><span style=3D"color: #000;" class=3D"=
styled-by-prettify">=C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">def</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"> perform_mass_delivery</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">(</span><span style=3D"color: #008;" class=3D"=
styled-by-prettify">self</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">):</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #080;" c=
lass=3D"styled-by-prettify">"""This method gets triggered by=
the browser."""</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 ziller_log</span><span=
style=3D"color: #660;" class=3D"styled-by-prettify">.</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify">info</span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #080;" =
class=3D"styled-by-prettify">"beginning zil generation"</span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">)</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 licenses </span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">=3D</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </s=
pan><span style=3D"color: #008;" class=3D"styled-by-prettify">self</span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">.</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">db</span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">.</span><span style=3D"color: #606;"=
class=3D"styled-by-prettify">Licenses</span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">.</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify">get_licenses_for_update</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">()</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">self</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">.</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify">_process_all_licenses</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify">licenses</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">return</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #0=
80;" class=3D"styled-by-prettify">"Success!"</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify"><br><br><br>=C2=A0 =C2=A0 </spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">def</span><span=
style=3D"color: #000;" class=3D"styled-by-prettify"> _process_all_licenses=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><s=
pan style=3D"color: #008;" class=3D"styled-by-prettify">self</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> licenses</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">):</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 ziller_log<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">.</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify">info</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"col=
or: #080;" class=3D"styled-by-prettify">"licenses to be updated: %s&qu=
ot;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">%</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> len</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify">licenses</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">))</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">for</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> i</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> license </span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">in</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> enumerate</span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">(</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify">licenses</span><span style=3D"color: #660;" class=3D"styled-by-prett=
ify">):</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br=
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ziller_log</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">.</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify">info</span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">(</span><span style=3D"color: #080;" class=3D"s=
tyled-by-prettify">"about updating license no %s of %s"</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">%</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">(</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify">i</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"> len</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify">licenses</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">)))</span><span=
style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">self</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">.</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
_try_zil_generation</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
license</span><span style=3D"color: #660;" class=3D"styled-by-prettify">)</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #800;" clas=
s=3D"styled-by-prettify"># best place for transaction.commit?</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"><br><br><br>=C2=A0 =C2=
=A0 </span><span style=3D"color: #066;" class=3D"styled-by-prettify">@stati=
cmethod</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br=
>=C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-prett=
ify">def</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> _=
try_zil_generation</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">l=
icense</span><span style=3D"color: #660;" class=3D"styled-by-prettify">):</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by=
-prettify">try</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">:</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #800=
;" class=3D"styled-by-prettify"># a lot is going on in generate_zil_for_ini=
tial_deliery</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color=
: #800;" class=3D"styled-by-prettify"># including the zip file generation -=
which is not covered by the transaction</span><span style=3D"color: #000;"=
class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
file_name</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> successo=
r </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> license</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">.</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify">generate_zil_for_initial_d=
elivery</span><span style=3D"color: #660;" class=3D"styled-by-prettify">()<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by=
-prettify">except</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> </span><span style=3D"color: #606;" class=3D"styled-by-prettify">Ex=
ception</span><span style=3D"color: #660;" class=3D"styled-by-prettify">:</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ziller_log</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">.</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify">error</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">(</span><span style=3D"color: #080;" class=3D"styled-b=
y-prettify">"license: "</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">+</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> license</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">.</span><span style=3D"color: #000;" class=3D"styled-by-prettify">getId=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(),</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> exc_info</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span st=
yle=3D"color: #008;" class=3D"styled-by-prettify">True</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">)</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><=
span style=3D"color: #008;" class=3D"styled-by-prettify">else</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">:</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 ziller_log</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">.</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify">info</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(=
</span><span style=3D"color: #080;" class=3D"styled-by-prettify">"lice=
nse: "</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">+</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> license</span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">.</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">getId</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">()</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">+</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> </span><span style=3D"color: #080;" class=3D"styled-by-pre=
ttify">" successfully updated"</span><span style=3D"color: #660;"=
class=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ziller_l=
og</span><span style=3D"color: #660;" class=3D"styled-by-prettify">.</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify">info</span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"=
color: #080;" class=3D"styled-by-prettify">"location of ziller file: %=
s"</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">%</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> file_name</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">)</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 ziller_log</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">.</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify">info</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">(</span><span style=3D"color: #080;" class=3D"styled-by-prettify">"=
successor: %s"</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
%</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> successo=
r</span><span style=3D"color: #660;" class=3D"styled-by-prettify">.</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify">getId</span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">())</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br><br></span></div></code>=
</div><div><br><br></div><div><br></div><div><b>Many questions..... (as I r=
eally, really want to understand what's going on)</b></div><div><br></d=
iv><div>1. Why did the ConflictError in the first test run happen exactly a=
t the end of the run? Coincidence?</div><div><br></div><div>2. Why do I get=
an OOBucket from an oid and not a business object - like a single license?=
</div><div><br></div><div>3. What exactly does the ConflictError mean? Prob=
lem when writing to the bucket or writing to a single business object?</div=
><div><br></div><div>4. Is it common that a bucket contains so many objects=
? I always thought a good "hash table" contains one or zero value=
s for a given key.</div><div><br></div><div>5. Where exactly did the Confli=
ctError occur? Unfortunately there is no line number in the traceback.</div=
><div><br></div><div>7. When I look at my code again, I also think that &qu=
ot;except Exception" is a bad decision. Should I at least catch Confli=
ctError and re-raise?</div><div><br></div><div>8. Iff the `except Exception=
` would have caught the above ConflictError, than the log message would hav=
e to start with "license ..." - but it does not.=C2=A0</div><div>=
<br></div><div>The ConflictError gets logged as "INFO" - which li=
ne of my code triggered that message?</div><div><br></div><div>9. When a Co=
nflictError occurs the transaction gets rolled back - but the created zil/z=
ip file is still on disk. What is the best way to clean it up? In the excep=
t block?</div><div><br></div><div>10. When I redo the 2nd test run with the=
same conditions, will the ConflictError occur at the very same license or =
is this non deterministic?</div><div><br></div><div>11. Why does it read &q=
uot;1 unresolved" at the second test run, when the license upgrade ind=
eed got retried and finally resolved?</div><div><br></div><div>12. Why do *=
*ConflictErrors** even occur when I am the only user?</div><div><br></div><=
div>For the production license upgrade, I plan to:</div><div>- add a transa=
ction.commit after each license upgrade</div><div>- deactivate all cron job=
s</div><div>- deactivate nginx/haproxy, so I am the only user of the applic=
ation (via lynx)</div><div>...</div><div><br></div><div>... any other hints=
/tipps/improvement suggestions for the above code or how to proceed?</div><=
div><br></div><div>Thank you very much for your help!</div><div>J=C3=BCrgen=
</div><div><br></div><div>P.S.: This was first posted on the Plone communit=
y board - but there I got directed there.</div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;zodb" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">zodb+unsubscri=
[email protected]</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/d/msgid/zodb/ba57a33b-baae-4de1-adf2-818f113e37d8%40googlegroups.com?utm=
_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/zodb=
/ba57a33b-baae-4de1-adf2-818f113e37d8%40googlegroups.com</a>.<br />
For more options, visit <a href=3D"https://groups.google.com/d/optout">http=
s://groups.google.com/d/optout</a>.<br />
------=_Part_482_41524778.1558623840730--
------=_Part_481_530351181.1558623840727--