-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[8.0] adding possibility to bulk insert in JobLoggingDB #7866
base: rel-v8r0
Are you sure you want to change the base?
Conversation
d5579d0
to
8fc7b77
Compare
8fc7b77
to
931e6d7
Compare
) | ||
|
||
# if JobID is a list, make a bulk insert | ||
if isinstance(jobID, list): | ||
for i, _ in enumerate(jobID): |
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.
zip
?
cmd = cmd[:-1] | ||
else: # else make a single insert | ||
epoc = _date.replace(tzinfo=datetime.timezone.utc).timestamp() - MAGIC_EPOC_NUMBER | ||
cmd = cmd + "(%d,'%s','%s','%s','%s',%f,'%s')" % ( |
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.
Would it not be better to use executemany
?
jobIDList, statusList, minorStatusList, date=timeStampList, source="JobManager" | ||
) | ||
else: | ||
for i, _ in enumerate(jobIDList): |
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.
zip
BEGINRELEASENOTES
*WMS
NEW: for parametric jobs, added the possibility to bulk insert records in JobLoggingDB
ENDRELEASENOTES