Skip to content
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

Remove UpdateBoxTokenTask #466

Merged
merged 1 commit into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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