Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a script that takes around 2 hours to fully reload, but all I want to test is a small section where various variables are being set... is there a way to do this, or do partial reloads only work for reloading table data?
Thanks,
Ben
Yes something like this:
IF IsPartialReload() THEN
SET var1='ABC';
LET var2 = 1+2;
ELSE // full reload
.....
.....
END IF
If you break down your load script into sub routines then you could have something like this:
IF IsPartialReload() THEN
CALL Sub2 // called both for partial and full reload
CALL Sub4
ELSE
Call Sub1
Call Sub2 // called both for partial and full reload
Call Sub3
END IF
You can have control of what is being executed during a partial reload by using the logical system function IsPartialReload():
So any assignment and evaluation of variables will be carried out for both normal full reloads as with partial reloads. You can use IF blocks with the IsPartialReload() to control what will be done during either of the types of reloads.
Ahh ok... so something like 'if IsPartialReload() then set variable1, etc.'?
And what would be the syntax to stop the partial reload at a certain point in time (End If)?
Thanks,
Ben
Yes something like this:
IF IsPartialReload() THEN
SET var1='ABC';
LET var2 = 1+2;
ELSE // full reload
.....
.....
END IF
If you break down your load script into sub routines then you could have something like this:
IF IsPartialReload() THEN
CALL Sub2 // called both for partial and full reload
CALL Sub4
ELSE
Call Sub1
Call Sub2 // called both for partial and full reload
Call Sub3
END IF
Great, thanks. I won't be able to test this out until later, but it seems pretty straightforward... I will let you know if I have any issues.
Thanks,
Ben
Another note to add:
you can also just take the code and put it in the very begining
if ispartialreload() then
set your variables
exit script;
end if
this will just exist after setting the variables, and will not do anything else. all table should retain as is.