Skip to content

Commit 44a48d0

Browse files
authored
Merge pull request #466 from classtranscribe/SharedBoxClient
Remove UpdateBoxTokenTask
2 parents 9dd1712 + 5ccac52 commit 44a48d0

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

TaskEngine/Tasks/QueueAwakerTask.cs

+5-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class QueueAwakerTask : RabbitMQTask<JObject>
2828
private readonly SceneDetectionTask _sceneDetectionTask;
2929
private readonly PythonCrawlerTask _pythonCrawlerTask;
3030
private readonly CreateBoxTokenTask _createBoxTokenTask;
31-
private readonly UpdateBoxTokenTask _updateBoxTokenTask;
31+
// private readonly UpdateBoxTokenTask _updateBoxTokenTask;
3232
private readonly BuildElasticIndexTask _buildElasticIndexTask;
3333
private readonly CleanUpElasticIndexTask _cleanUpElasticIndexTask;
3434
// private readonly ExampleTask _exampleTask;
@@ -42,7 +42,8 @@ public QueueAwakerTask(RabbitMQConnection rabbitMQ, DownloadPlaylistInfoTask dow
4242
TranscriptionTask transcriptionTask, ProcessVideoTask processVideoTask,
4343
// GenerateVTTFileTask generateVTTFileTask,
4444
SceneDetectionTask sceneDetectionTask,
45-
CreateBoxTokenTask createBoxTokenTask, UpdateBoxTokenTask updateBoxTokenTask, PythonCrawlerTask pythonCrawlerTask,
45+
CreateBoxTokenTask createBoxTokenTask,// UpdateBoxTokenTask updateBoxTokenTask,
46+
PythonCrawlerTask pythonCrawlerTask,
4647
BuildElasticIndexTask buildElasticIndexTask, CleanUpElasticIndexTask cleanUpElasticIndexTask,
4748

4849
DescribeVideoTask describeVideoTask,// DescribeImageTask describeImageTask,ExampleTask exampleTask,
@@ -58,7 +59,7 @@ public QueueAwakerTask(RabbitMQConnection rabbitMQ, DownloadPlaylistInfoTask dow
5859
_sceneDetectionTask = sceneDetectionTask;
5960
_pythonCrawlerTask = pythonCrawlerTask;
6061
_createBoxTokenTask = createBoxTokenTask;
61-
_updateBoxTokenTask = updateBoxTokenTask;
62+
// _updateBoxTokenTask = updateBoxTokenTask;
6263
_buildElasticIndexTask = buildElasticIndexTask;
6364
_cleanUpElasticIndexTask = cleanUpElasticIndexTask;
6465
_describeVideoTask = describeVideoTask;
@@ -145,7 +146,7 @@ private async Task PendingJobs()
145146

146147

147148
// Update Box Token every few hours
148-
_updateBoxTokenTask.Publish("");
149+
// _updateBoxTokenTask.Publish("");
149150

150151
//We will use these outside of the DB scope
151152
// List<String> todoVTTs ;

TaskEngine/Tasks/UpdateBoxTokenTask.cs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2007
99
// We are okay awaiting on a task in the same thread
1010

11+
12+
// !!! May be removed in the future
1113
namespace TaskEngine.Tasks
1214
{
1315
[SuppressMessage("Microsoft.Performance", "CA1812:MarkMembersAsStatic")] // This class is never directly instantiated

TaskEngine/TempCode.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class TempCode
1919

2020
private readonly CTDbContext context;
2121
private readonly CreateBoxTokenTask _createBoxTokenTask;
22-
private readonly UpdateBoxTokenTask _updateBoxTokenTask;
22+
// private readonly UpdateBoxTokenTask _updateBoxTokenTask;
2323
private readonly SceneDetectionTask _sceneDetectionTask;
2424
private readonly PythonCrawlerTask _pythonCrawlerTask;
2525
private readonly ProcessVideoTask _processVideoTask;
@@ -32,7 +32,7 @@ class TempCode
3232
private readonly QueueAwakerTask _queueAwakerTask;
3333
private readonly CleanUpElasticIndexTask _cleanUpElasticIndexTask;
3434

35-
public TempCode(CTDbContext c, CreateBoxTokenTask createBoxTokenTask, UpdateBoxTokenTask updateBoxTokenTask,
35+
public TempCode(CTDbContext c, CreateBoxTokenTask createBoxTokenTask, //UpdateBoxTokenTask updateBoxTokenTask,
3636
SceneDetectionTask ePubGeneratorTask, ProcessVideoTask processVideoTask,
3737
TranscriptionTask transcriptionTask, ConvertVideoToWavTask convertVideoToWavTask, DownloadMediaTask downloadMediaTask,
3838
DownloadPlaylistInfoTask downloadPlaylistInfoTask, QueueAwakerTask queueAwakerTask,
@@ -41,7 +41,7 @@ public TempCode(CTDbContext c, CreateBoxTokenTask createBoxTokenTask, UpdateBoxT
4141
{
4242
context = c;
4343
_createBoxTokenTask = createBoxTokenTask;
44-
_updateBoxTokenTask = updateBoxTokenTask;
44+
// _updateBoxTokenTask = updateBoxTokenTask;
4545
_sceneDetectionTask = ePubGeneratorTask;
4646
_processVideoTask = processVideoTask;
4747
// _generateVTTFileTask = generateVTTFileTask;

0 commit comments

Comments
 (0)