On Wed, Jun 7, 2017 at 2:08 AM, Christian McHugh
<[email protected]> wrote:
> In
> reading about Step operations, it looks like you should be able to add
> something like the following to the Step class.
>
>  @StepContextParameter

This is deprecated. Use `StepContext.get` for new code.

> The problem comes in how to handle the onResume(). Since the reference to
> the thread has been lost, I'm not able to reattach to it if the Jenkins
> master restarts.

Reattach? That makes no sense—there will be a new JVM (generally).
Rather you need to start a new background thread (or use `Timer`), as
in `SleepStep` for example.

> I can write a file to the workspace containing the job ID being
> polled

`StepExecution` may have non-`transient` fields which will be restored.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr0wu8sb21%3DnEaS7uE03PMYiYi6f4X-8rvRDtjrSZMdttg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to