I see, thanks. If the TaskInstance is *currently running*, this will match the column in the database, *in all other cases this will be incremented*.
On Thu, Feb 6, 2020 at 11:55 AM Kamil Breguła <[email protected]> wrote: > @property > def try_number(self): > """ > Return the try number that this task number will be when it is > actually > run. > > If the TaskInstance is currently running, this will match the > column in the > database, in all other cases this will be incremented. > """ > # This is designed so that task logs end up in the right file. > if self.state == State.RUNNING: > return self._try_number > return self._try_number + 1 > > Here is the answer. > > On Thu, Feb 6, 2020 at 10:03 PM Reed Villanueva <[email protected]> > wrote: > >> I have noticed that even if tasks run only once during a dag run, the >> try_number in the tasks details panel is already at 2. >> [image: image.png] >> Is this supposed to happen? Is there a reason that this could be >> happening? Any way to fix or debug? >> >> This electronic message is intended only for the named >> recipient, and may contain information that is confidential or >> privileged. If you are not the intended recipient, you are >> hereby notified that any disclosure, copying, distribution or >> use of the contents of this message is strictly prohibited. If >> you have received this message in error or are not the named >> recipient, please notify us immediately by contacting the >> sender at the electronic mail address noted above, and delete >> and destroy all copies of this message. Thank you. >> > -- This electronic message is intended only for the named recipient, and may contain information that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately by contacting the sender at the electronic mail address noted above, and delete and destroy all copies of this message. Thank you.
