yt handler theoretically works
This commit is contained in:
parent
a3722980e7
commit
58b2560051
@ -24,7 +24,7 @@ namespace director
|
||||
private static HttpClient httpClient;
|
||||
private static readonly ConcurrentQueue<Schedulable.Schedulable> workQueue = new ConcurrentQueue<Schedulable.Schedulable>();
|
||||
private static readonly AutoResetEvent _signal = new AutoResetEvent(false);
|
||||
private const int concurrentWorkers = 2;
|
||||
private const int concurrentWorkers = 5;
|
||||
static void Main(string[] args)
|
||||
{
|
||||
if (!File.Exists("appsettings.json"))
|
||||
@ -97,11 +97,13 @@ namespace director
|
||||
}
|
||||
Console.WriteLine("calendars checked");
|
||||
#if (DEBUG)
|
||||
for (int i = 0; i < 0; i++)
|
||||
//if(true)
|
||||
{
|
||||
Console.WriteLine("debug test");
|
||||
|
||||
var psuedo = new Schedulable.Schedulable();
|
||||
psuedo.Showtime = DateTime.Now + TimeSpan.FromSeconds(30);
|
||||
var partiallyCopiable = scratch.agenda?.FirstOrDefault(s => s.ScedulableType == Schedulable.ScedulableType.YTRelease);
|
||||
var partiallyCopiable = scratch.agenda?.FirstOrDefault(s => s.ScedulableType == Schedulable.ScedulableType.TwitchStream);
|
||||
psuedo.Occurrence = partiallyCopiable.Occurrence;
|
||||
psuedo.Occurrence.OccurrenceStart = psuedo.Showtime;
|
||||
psuedo.Occurrence.OccurrenceEnd = psuedo.Showtime;
|
||||
|
@ -23,7 +23,7 @@ namespace ShowHandlers
|
||||
public override void Handle(iCalHoopJumping.CalendarOccurrence evt)
|
||||
{
|
||||
Console.WriteLine($"begin youtube handler. current time {DateTime.Now.ToLongTimeString()}");
|
||||
Console.WriteLine(JsonConvert.SerializeObject(evt));
|
||||
//Console.WriteLine(JsonConvert.SerializeObject(evt));
|
||||
Task.Run(() => PreShow(evt));
|
||||
Console.WriteLine("kicked off the pre-show");
|
||||
if (evt.OccurrenceStart > DateTime.Now)
|
||||
@ -52,7 +52,7 @@ namespace ShowHandlers
|
||||
agentsPresent.Clear();
|
||||
|
||||
Telefranz.Instance.addHandler<silver_messages.global.report>(agentReports);
|
||||
// Telefranz.Instance.ProduceMessage(new silver_messages.global.sound_off());
|
||||
Telefranz.Instance.ProduceMessage(new silver_messages.global.sound_off());
|
||||
while (AgentsNeeded.Where(ap => !agentsPresent.Contains(ap))?.Count() > 0)
|
||||
{
|
||||
checkSignal.WaitOne(TimeSpan.FromSeconds(15));
|
||||
@ -78,7 +78,7 @@ namespace ShowHandlers
|
||||
issueChecks();
|
||||
while (metadataUnset(metadataSoFar))
|
||||
{
|
||||
//checkSignal.WaitOne(TimeSpan.FromHours(6));
|
||||
//checkSignal.WaitOne(TimeSpan.FromHours(6)); //so bother me every 6 hours before yt release time if metadata isn't ready
|
||||
checkSignal.WaitOne(TimeSpan.FromSeconds(15));
|
||||
if (DateTime.Now > evt.OccurrenceStart - leadNeeded)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user