mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 02:19:58 -03:30
Remove file when moving data to database.
This commit is contained in:
parent
dea41b6126
commit
d325cd4d09
@ -517,6 +517,15 @@ class UnifiedJob(PolymorphicModel, PasswordFieldsModel, CommonModelNameNotUnique
|
||||
if 'result_stdout_text' not in update_fields:
|
||||
update_fields.append('result_stdout_text')
|
||||
|
||||
# Attempt to delete the job output from the filesystem if it
|
||||
# was moved to the database.
|
||||
if self.result_stdout_file:
|
||||
try:
|
||||
os.remove(self.result_stdout_file)
|
||||
self.result_stdout_file = ''
|
||||
except:
|
||||
pass # Meh. We don't care that much.
|
||||
|
||||
# If we have a start and finished time, and haven't already calculated
|
||||
# out the time that elapsed, do so.
|
||||
if self.started and self.finished and not self.elapsed:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user