Bjarne
Bjarne
WWindmill
Created by Bjarne on 11/27/2024 in #help
How to differentiate between preview and production runs?
As the title says: how do I know inside of my script if it is running in preview or production mode? I noticed that I might be able to use env variables for this (in the settings - runtime menu), and this works if you are just running the script standalone. But, when I wish to run a flow in preview mode, the scripts inside of the flow do not seem to realize they are running in preview mode, and the production environment variables are still used.
5 replies
WWindmill
Created by Bjarne on 11/26/2024 in #help
Custom url for public app
Hey, we are creating some public apps using windmill and would like to assign a custom url to these pages. For example, I want a user to be able to browse to windmill.company.com/my_app and be shown my page, without them seeing a redirect to /public/foo/bar in their browser. This would make it way easier for them to bookmark stuff. Is this possible through the caddy files? We couldn't get it to work.
3 replies
WWindmill
Created by Bjarne on 11/25/2024 in #help
Python requirement issues
Hey, I am trying to write a script that makes use of the azure opentelemetry sdk. When I run the script below locally, it just works. But when running in windmill. I get this error: ModuleNotFoundError: No module named 'azure.monitor.opentelemetry' The script:
#requirements:
#azure-monitor-events-extension
#azure-monitor-opentelemetry

import logging
import os

from azure.monitor.events.extension import track_event
from azure.monitor.opentelemetry import configure_azure_monitor

# Configure the connection to the application insights instance
configure_azure_monitor(connection_string=wmill.get_variable("f/playground/appi_connection_string"))

def main(application_name: str) -> None:
# Name indicates PROD / DEV split
event_name = f"Running flow xyz"

# Send the event to app insights
track_event(event_name)
#requirements:
#azure-monitor-events-extension
#azure-monitor-opentelemetry

import logging
import os

from azure.monitor.events.extension import track_event
from azure.monitor.opentelemetry import configure_azure_monitor

# Configure the connection to the application insights instance
configure_azure_monitor(connection_string=wmill.get_variable("f/playground/appi_connection_string"))

def main(application_name: str) -> None:
# Name indicates PROD / DEV split
event_name = f"Running flow xyz"

# Send the event to app insights
track_event(event_name)
I don't understand what I am doing wrong. Am I missing an important limitation of the windmill python requirements system?
20 replies