No, but that's certainly worth a try, thanks. (I just need to figure out how to make it fail when I want it to...)
- Log in to post comments
No, but that's certainly worth a try, thanks. (I just need to figure out how to make it fail when I want it to...)
Thanks James,
Do I read the implication correctly, that Ens.Config.Item.GetSetting() does not account for System Default Settings?
Is there a way to avoid copying iris.dat? That is, can the two databases be created separately and then set up as mirrored?
Thanks! That was ungooglable.
The marketplace search is a little sensitive, so note that it's "GitLens", not "Git Lens".
The documentation link at the end of the post has changed. Here's the current one.
Thanks Enrico, that did the trick!
Thanks!
Looking at Ens.Job, there's also a ShouldAbort() and ShouldSuspend(). I guess I'll need to handle those, too, right?
Thanks!
I found OnProductionStop(), but I'm after something different, along the lines of calling Ens.Director.GetProductionStatus() from within OnMessage() but with a fifth possible state: ProductionStateStopping
What I'm trying to do is custom retry logic that retries on certain errors, which could mean a pretty long total hang time, so it would seem well-behaved to check every second (or so) whether it's time to shut down.
Thinking about it, it would be a lot better to be able to tell whether the host itself should stop. That is, regardless of whether it's because of a production shutdown or a stop/restart of the individual host.
Thanks, Robert, and sorry for the very late response!
Perhaps. Could you expand on what you're trying to do?
Thanks Dimitrii, your question answered my question (how to get rid of the trailing slash).
Yes, with a ZNSPACE in between.
The new key did the trick. Thanks for the quick response!
Note that applying the new IRIS for Health key (I haven't tried plain IRIS) yields a warning that it lacks some of the analytics features of the expiring key.
Thanks, Steve. Much appreciated.
Otto
Nothing nonstandard. I went to the marketplace (link below) and pressed "Launch". The deployment page then (optionally) allows TCP traffic on ports 22, 1971 and 52773. (For unrelated reasons, I haven't actually deployed yet.)
https://console.cloud.google.com/marketplace/product/intersystems-launc…
Cheers,
Otto
Perfect! Many thanks, Julian.
...or using a stored procedure along these lines:
{
try {
&sql(select %ID into :className
from %Dictionary.ClassDefinition
where SqlTableName = :oldName
)
if SQLCODE set status = "Error: Table '" _ oldName _ "' not found." quit
set classDef = ##class(%Dictionary.ClassDefinition).%OpenId(className)
set classDef.SqlTableName = newName
set saveStatus = classDef.%Save()
set status = $case(saveStatus, 1: "OK", : "Error: " _ $system.Status.GetErrorText(saveStatus))
} catch {
set status = "Error: " _ $zerror
}
return status
}
Note: This doesn't handle the special case where there is no 'SqlTableName' defined.
Hi Dimitry,
Was the webinar recorded? I'd say you'll get at least another 80 viewers if you publish it...
Cheers,
Otto
Agreed, and if you want to have your cake and eat it, too:
if (a) { set b = a }Somewhat off-topic, there are reasons to watch out for %OnBeforeSave():
%OnAddToSaveSet() has neither of these gotchas (but you don't have %Id() there either, of course).
...and don't forget to kill the global when you're done. On a busy system, the log file could grow very large.
Otto
Hi Kishan,
The error message indicates that you're trying to access a property called 'value' in a collection of objects (%Collection.ListOfObj), but there is no such thing. My guess is that you're trying to access a property of one of the objects in the collection, in which case you need to use the 'GetAt' method of the collection object to specify which one you're after.
Here's more information on how to handle collections of objects.
Otto
This only matters for very long loops (and you'd need a pretty extreme scenario for it to matter even then), but a post-conditional 'quit' is only meaningful if there's more code after it, and it comes with a performance cost, so this line:
USER>for count = count:1 set ref=$query(@ref) quit:ref=""
...should be:
USER>for count = count:1 set ref=$query(@ref) if (ref="") quit
...or did you already have data in the table when you added the index on A? Assuming that some or all of the pre-existing data is in your WHERE range, that would explain your problem, and as others have commented, an index rebuild is the remedy.
([@Kyle Baxter]: Your answer is in response to [@Scott Morrison]'s comment, right?)
Another thing to consider is that child objects have non-integer IDs, so you can't use bitmap or bitslice indices on their properties.
Yes. In fact, SQL access predates objects.
Depending on the exact behavior you're after, the "binary follows" operator (]) may do the trick. For your two values, it yields the desired result, regardless of how you set them:
USER>set a = "1.0", b = "2.2" write a]b 0 USER>set a = "1.0", b = 2.2 write a]b 0 USER>set a = 1.0, b = 2.2 write a]b 0 USER>set a = 1.0, b = "2.2" write a]b 0