URL Logger hangs

More
2 years 2 months ago #23916 by prashant
Replied by prashant on topic URL Logger hangs
Thank you so much for putting together this script , I will try it out & update my result.It's really appreciated. 

You are right , with web hooks the battle is for milliseconds, I will also try to shave off few milliseconds by putting together a python script where I will pass the logid , so that it can access the sql directory and not writing the json file. 

 
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

More
2 years 2 months ago #23941 by prashant
Replied by prashant on topic URL Logger hangs
Update, we've simplified the script even further now by reading directly the logID from sql table instead of writing and then reading the json file
Code:
const { spawn } = require('child_process'); try {     const WORKING_DIRECTORY = 'C:\\Users\\Superadmin\\Documents\\KBIAutomation\\brain\\';     const pythonExecutablePath = `python`;  // Use 'python' from PATH     const parameters = ["mywork.py",logId,"whip.yaml"];     // Execute the Python script without waiting for completion within specified working directory     spawn(pythonExecutablePath, parameters, { cwd: WORKING_DIRECTORY,detached: true })     return 200; } catch (err) { logger.error(`Caught an error: ${err.message ? err.message : err}`); return 500; // Any error caught here results in a 500 status }

Please Log in or Create an account to join the conversation.

More
2 years 2 months ago #23942 by admin
Replied by admin on topic URL Logger hangs
Looks good 

Mike
ETL Architect

Please Log in or Create an account to join the conversation.

Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Read more
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Google
Accept
Decline
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Google Analytics
Accept
Decline
Functional
Tools used to give you more features when navigating on the website, this can include social sharing.
Advertisement
If you accept, the ads on the page will be adapted to your preferences.
Google Ad
Accept
Decline
Save