Hi Gabriel, Part of what gets logged isn’t know at the time I know something needs to be logged. The code is easiest if I can say, “Hey, please log this situation” and have the actual logging happen a few seconds later. As I said, this is a quick a dirty injection of some logging code to track down a bug. Not the normal thing.
However, I changed my method of doing this yesterday so I’m not using workers anymore. Just a background process and some interprocess arrays. Not the cool new way, but it does work. Thanks. -- Cannon.Smith Synergy Farm Solutions Inc. Aetna, AB Canada <[email protected]> <www.synergyfarmsolutions.com> > On Mar 14, 2019, at 1:03 AM, GI -AJAR <[email protected]> wrote: > > Why do you need to run the check after few seconds? We use this same kind of > worker to write logs in files. As you said, the worker assure the file not to > be opened. So in this contexte you know your file is accessible. You can > still have an error handler to handle the case where there is an unexpected > issue. We have a log table for those rare cases. > > I didn't try but a delay process should work in a worker but I would say it > is not optimal as it will make the stack of the messages to wait seconds > before to be processed. A worker should be fast so the next messages can be > process quickly. But it depend on the number of log request you send to the > worker. > ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

