Skip to content

Commit

Permalink
Merge pull request #466 from classtranscribe/SharedBoxClient
Browse files Browse the repository at this point in the history
Remove UpdateBoxTokenTask
  • Loading branch information
angrave authored Jan 27, 2024
2 parents 9dd1712 + 5ccac52 commit 44a48d0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
9 changes: 5 additions & 4 deletions TaskEngine/Tasks/QueueAwakerTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class QueueAwakerTask : RabbitMQTask<JObject>
private readonly SceneDetectionTask _sceneDetectionTask;
private readonly PythonCrawlerTask _pythonCrawlerTask;
private readonly CreateBoxTokenTask _createBoxTokenTask;
private readonly UpdateBoxTokenTask _updateBoxTokenTask;
// private readonly UpdateBoxTokenTask _updateBoxTokenTask;
private readonly BuildElasticIndexTask _buildElasticIndexTask;
private readonly CleanUpElasticIndexTask _cleanUpElasticIndexTask;
// private readonly ExampleTask _exampleTask;
Expand All @@ -42,7 +42,8 @@ public QueueAwakerTask(RabbitMQConnection rabbitMQ, DownloadPlaylistInfoTask dow
TranscriptionTask transcriptionTask, ProcessVideoTask processVideoTask,
// GenerateVTTFileTask generateVTTFileTask,
SceneDetectionTask sceneDetectionTask,
CreateBoxTokenTask createBoxTokenTask, UpdateBoxTokenTask updateBoxTokenTask, PythonCrawlerTask pythonCrawlerTask,
CreateBoxTokenTask createBoxTokenTask,// UpdateBoxTokenTask updateBoxTokenTask,
PythonCrawlerTask pythonCrawlerTask,
BuildElasticIndexTask buildElasticIndexTask, CleanUpElasticIndexTask cleanUpElasticIndexTask,

DescribeVideoTask describeVideoTask,// DescribeImageTask describeImageTask,ExampleTask exampleTask,
Expand All @@ -58,7 +59,7 @@ public QueueAwakerTask(RabbitMQConnection rabbitMQ, DownloadPlaylistInfoTask dow
_sceneDetectionTask = sceneDetectionTask;
_pythonCrawlerTask = pythonCrawlerTask;
_createBoxTokenTask = createBoxTokenTask;
_updateBoxTokenTask = updateBoxTokenTask;
// _updateBoxTokenTask = updateBoxTokenTask;
_buildElasticIndexTask = buildElasticIndexTask;
_cleanUpElasticIndexTask = cleanUpElasticIndexTask;
_describeVideoTask = describeVideoTask;
Expand Down Expand Up @@ -145,7 +146,7 @@ private async Task PendingJobs()


// Update Box Token every few hours
_updateBoxTokenTask.Publish("");
// _updateBoxTokenTask.Publish("");

//We will use these outside of the DB scope
// List<String> todoVTTs ;
Expand Down
2 changes: 2 additions & 0 deletions TaskEngine/Tasks/UpdateBoxTokenTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2007
// We are okay awaiting on a task in the same thread


// !!! May be removed in the future
namespace TaskEngine.Tasks
{
[SuppressMessage("Microsoft.Performance", "CA1812:MarkMembersAsStatic")] // This class is never directly instantiated
Expand Down
6 changes: 3 additions & 3 deletions TaskEngine/TempCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class TempCode

private readonly CTDbContext context;
private readonly CreateBoxTokenTask _createBoxTokenTask;
private readonly UpdateBoxTokenTask _updateBoxTokenTask;
// private readonly UpdateBoxTokenTask _updateBoxTokenTask;
private readonly SceneDetectionTask _sceneDetectionTask;
private readonly PythonCrawlerTask _pythonCrawlerTask;
private readonly ProcessVideoTask _processVideoTask;
Expand All @@ -32,7 +32,7 @@ class TempCode
private readonly QueueAwakerTask _queueAwakerTask;
private readonly CleanUpElasticIndexTask _cleanUpElasticIndexTask;

public TempCode(CTDbContext c, CreateBoxTokenTask createBoxTokenTask, UpdateBoxTokenTask updateBoxTokenTask,
public TempCode(CTDbContext c, CreateBoxTokenTask createBoxTokenTask, //UpdateBoxTokenTask updateBoxTokenTask,
SceneDetectionTask ePubGeneratorTask, ProcessVideoTask processVideoTask,
TranscriptionTask transcriptionTask, ConvertVideoToWavTask convertVideoToWavTask, DownloadMediaTask downloadMediaTask,
DownloadPlaylistInfoTask downloadPlaylistInfoTask, QueueAwakerTask queueAwakerTask,
Expand All @@ -41,7 +41,7 @@ public TempCode(CTDbContext c, CreateBoxTokenTask createBoxTokenTask, UpdateBoxT
{
context = c;
_createBoxTokenTask = createBoxTokenTask;
_updateBoxTokenTask = updateBoxTokenTask;
// _updateBoxTokenTask = updateBoxTokenTask;
_sceneDetectionTask = ePubGeneratorTask;
_processVideoTask = processVideoTask;
// _generateVTTFileTask = generateVTTFileTask;
Expand Down

0 comments on commit 44a48d0

Please sign in to comment.