Hello, My dagster daemon is causing my Azure cont...
# troubleshooting
i
Hello, My dagster daemon is causing my Azure container revision start to fail when I try deploying my docker container. I'm using the default db that comes with dagster - which IIRC is what the schedular looks at to see if any jobs have executed for that day. I believe it's looking at this, sees my jobs haven't executed because it's anin-memory db, then runs my jobs immediately - which is causing my health probe to fail. Is this just something that will keep happening until I use another db for dagster so it has some state to look at and doesn't run the job because it can see something has run? I didn't get this behavior until recently so I'm a bit confused as to why it just started. • Should I just create a db for dagster to connect to and also write logs to? I need to do that anyways for logs so if I can kill two birds with one stone that would be great. • Is there a simpler work around I could use? This is what I'm getting that I wasn't getting previously on my CLI:
dagster.daemon.SchedulerDaemon - INFO - Evaluating schedule
Copy code
# Custom evaluation function for schedules
def custom_evaluation_fn(context: ScheduleEvaluationContext):
            scheduled_time = context.scheduled_execution_time
            current_time = datetime.now(scheduled_time.tzinfo)

            # Define threshold for the maximum allowed time difference
            threshold_minutes = 60
            time_difference = current_time - scheduled_time

            if time_difference > timedelta(minutes=threshold_minutes):
                return SkipReason(
                    f"Skipping missed tick because time difference {time_difference} exceeds threshold of {threshold_minutes} minutes."
                )

            return RunRequest()

        basic_schedule = ScheduleDefinition(
            job=asset_job,
            cron_schedule=spec.cron_schedule,
            default_status=DefaultScheduleStatus.RUNNING,
            execution_fn=custom_evaluation_fn
        )
This worked for my local build - going to try it in Azure now. Referenced an example I found on GitHub : https://github.com/dagster-io/dagster/issues/18294