File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,15 @@ command = 'ffmpeg -nostats -re -f lavfi -r 25 -i testsrc -f lavfi -i si
134
134
#exit_code = 0
135
135
136
136
137
+ [ingest]
138
+
139
+ # Delete recordings after they have been successfully uploaded. This does only
140
+ # apply to the content of the recording directory, not the metadata.
141
+ # Type: boolean
142
+ # Default: False
143
+ #delete_after_upload = False
144
+
145
+
137
146
[server]
138
147
139
148
# Base URL of the admin server. This corresponds to the
Original file line number Diff line number Diff line change 34
34
sigkill_time = integer(min=-1, default=120)
35
35
exit_code = integer(min=0, max=255, default=0)
36
36
37
+ [ingest]
38
+ delete_after_upload = boolean(default=false)
39
+
37
40
[server]
38
41
url = string(default='https://develop.opencast.org')
39
42
auth_method = option('basic', 'digest', default='digest')
Original file line number Diff line number Diff line change 16
16
import logging
17
17
import pycurl
18
18
import sdnotify
19
+ import shutil
19
20
import time
20
21
import traceback
21
22
@@ -99,6 +100,10 @@ def ingest(event):
99
100
# Update status
100
101
recording_state (event .uid , 'upload_finished' )
101
102
update_event_status (event , Status .FINISHED_UPLOADING )
103
+ if config ('ingest' , 'delete_after_upload' ):
104
+ directory = event .directory ()
105
+ logger .info ("Removing uploaded event directory %s" , directory )
106
+ shutil .rmtree (directory )
102
107
notify .notify ('STATUS=Running' )
103
108
set_service_status_immediate (Service .INGEST , ServiceStatus .IDLE )
104
109
You can’t perform that action at this time.
0 commit comments