mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
reconcile java with latest patterns
This commit is contained in:
@@ -171,9 +171,9 @@ func (d *Driver) Capabilities() (*drivers.Capabilities, error) {
|
||||
return capabilities, nil
|
||||
}
|
||||
|
||||
func (r *Driver) Fingerprint(ctx context.Context) (<-chan *drivers.Fingerprint, error) {
|
||||
func (d *Driver) Fingerprint(ctx context.Context) (<-chan *drivers.Fingerprint, error) {
|
||||
ch := make(chan *drivers.Fingerprint)
|
||||
go r.handleFingerprint(ctx, ch)
|
||||
go d.handleFingerprint(ctx, ch)
|
||||
return ch, nil
|
||||
}
|
||||
|
||||
@@ -241,7 +241,16 @@ func (d *Driver) buildFingerprint() *drivers.Fingerprint {
|
||||
|
||||
func (d *Driver) RecoverTask(handle *drivers.TaskHandle) error {
|
||||
if handle == nil {
|
||||
return fmt.Errorf("error: handle cannot be nil")
|
||||
return fmt.Errorf("handle cannot be nil")
|
||||
}
|
||||
|
||||
// If already attached to handle there's nothing to recover.
|
||||
if _, ok := d.tasks.Get(handle.Config.ID); ok {
|
||||
d.logger.Debug("nothing to recover; task already exists",
|
||||
"task_id", handle.Config.ID,
|
||||
"task_name", handle.Config.Name,
|
||||
)
|
||||
return nil
|
||||
}
|
||||
|
||||
var taskState TaskState
|
||||
|
||||
Reference in New Issue
Block a user