<#9147 bug: Send first heartbeat when initializing...
# meltano-repo-activity
g
#9147 bug: Send first heartbeat when initializing job Issue created by leag ### Feature scope Configuration (settings parsing, validation, etc.) ### Description I'm not running any legacy jobs, and sometimes a run gets stuck or terminates without setting a hearbeat (
last_heartbeat_at
=
NULL
) and with
state
=
RUNNING
. The run then falls into the category of heartbeatless legacy job in Meltano, and I have to wait a day to run it again or manually remove it from the system db. meltano/src/meltano/core/job/job.py Lines 181 to 190 in</meltano/meltano/commit/7e05ed031c68e97434d1e2c98ada91f33bdd1e04|7e05ed0> | def valid_intil(self) -> datetime: | | -------------------------------------------------------------------------- | | """Return the datetime when this job goes stale. | | | | Returns: | | datetime when this job goes stale | | """ | | if self.last_heartbeat_at: | | return self.last_heartbeat_at + timedelta(minutes=HEARTBEAT_VALID_MINUTES) | | | | return self.started_at + timedelta(hours=HEARTBEATLESS_JOB_VALID_HOURS) | Possible solutions: • A configuration flag to drop support for legacy jobs • A setteable HEARTBEATLESS_JOB_VALID_HOURS meltano/meltano