mask off bad conversion task launches

This commit is contained in:
Ryan Fleury
2025-10-23 15:58:00 -07:00
parent 5a93f5d4cb
commit e88a59a57e
2 changed files with 37 additions and 15 deletions
+18 -3
View File
@@ -85,25 +85,40 @@ correct_slash_from_char(U8 c)
internal U64 internal U64
cstring8_length(U8 *c) cstring8_length(U8 *c)
{ {
U64 length = 0;
if(c)
{
U8 *p = c; U8 *p = c;
for (;*p != 0; p += 1); for (;*p != 0; p += 1);
return (p - c); length = (U64)(p - c);
}
return length;
} }
internal U64 internal U64
cstring16_length(U16 *c) cstring16_length(U16 *c)
{ {
U64 length = 0;
if(c)
{
U16 *p = c; U16 *p = c;
for (;*p != 0; p += 1); for (;*p != 0; p += 1);
return (p - c); length = (U64)(p - c);
}
return length;
} }
internal U64 internal U64
cstring32_length(U32 *c) cstring32_length(U32 *c)
{ {
U64 length = 0;
if(c)
{
U32 *p = c; U32 *p = c;
for (;*p != 0; p += 1); for (;*p != 0; p += 1);
return (p - c); length = (U64)(p - c);
}
return length;
} }
//////////////////////////////// ////////////////////////////////
+8 -1
View File
@@ -694,6 +694,7 @@ di_async_tick(void)
} }
U64 og_size = t->og_size; U64 og_size = t->og_size;
B32 og_is_rdi = t->og_is_rdi; B32 og_is_rdi = t->og_is_rdi;
B32 og_is_good = (og_size > 0);
//- rjf: compute key's RDI path //- rjf: compute key's RDI path
String8 rdi_path = {0}; String8 rdi_path = {0};
@@ -785,7 +786,7 @@ di_async_tick(void)
} }
//- rjf: launch conversion processes //- rjf: launch conversion processes
if(ready_to_launch_conversion) if(og_is_good && ready_to_launch_conversion)
{ {
B32 should_compress = 0; B32 should_compress = 0;
OS_ProcessLaunchParams params = {0}; OS_ProcessLaunchParams params = {0};
@@ -850,6 +851,12 @@ di_async_tick(void)
} }
} }
//- rjf: ready to launch, but bad O.G. file -> just immediately mark as done
if(!og_is_good && ready_to_launch_conversion)
{
t->status = DI_LoadTaskStatus_Done;
}
//- rjf: if the RDI for this task is not stale, then we're already done - mark this //- rjf: if the RDI for this task is not stale, then we're already done - mark this
// task as done & prepped for storing into the cache // task as done & prepped for storing into the cache
if(!rdi_is_stale) if(!rdi_is_stale)