luigi icon indicating copy to clipboard operation
luigi copied to clipboard

Task started by even_handler stucks for long running parent task.

Open nickorka opened this issue 9 years ago • 1 comments

What I'm trying to do

Task Export { ... }
Task Calc {
   ...
   run() {
      ...
      self.trigger_event(Event.SUCCESS, self.export_task)
   }
   ...
   __init__(){
      ...
      self.export_tast = Export(...)
     }
}

@Calc.event_handler(Event.SUCCESS)
def success(task): {
    print "Event_handler has been called"
    build([task])
}

If Calc runs fast (a couple of mins), Export starts without any problem, but if Calc takes longer (30+ mins) I'm getting this log:

DEBUG: Checking if Export(...) is complete /usr/local/lib/python2.7/site-packages/luigi/worker.py:305: UserWarning: Task Export(...) without outputs has no custom complete() method is_complete = task.complete() INFO: Informed scheduler that task Export_60fa0c83de has status PENDING INFO: Done scheduling tasks INFO: Running Worker with 2 processes DEBUG: Asking scheduler for work... DEBUG: Pending tasks: 1 DEBUG: 2 running tasks, waiting for next task to finish DEBUG: 2 running tasks, waiting for next task to finish

In the luigi log it will do waiting for next task to finish for ever, but in scheduler I can see that the Export has failed. There is no way to see what was the error, worker is not stopping. With ps -ef | grep luigi I can see that there are two processes.

I'm using:

sudo /usr/bin/pip show luigi

Metadata-Version: 1.1
Name: luigi
Version: 2.5.0
Summary: Workflow mgmgt + task scheduling + dependency resolution
Home-page: https://github.com/spotify/luigi
Author: Erik Bernhardsson
Author-email: UNKNOWN
License: Apache License 2.0
Location: /usr/local/lib/python2.7/site-packages
Requires: tornado, python-daemon
Entry-points:
  [console_scripts]
  luigi = luigi.cmdline:luigi_run
  luigi-deps = luigi.tools.deps:main
  luigi-deps-tree = luigi.tools.deps_tree:main
  luigi-grep = luigi.tools.luigi_grep:main
  luigi-migrate = luigi.tools.migrate:main
  luigid = luigi.cmdline:luigid

Is there any idea why worker doesn't stop? Why Export task fails when if I run it individually it works just perfect?

Thanks in advance, Nick Orka

nickorka avatar Nov 17 '17 17:11 nickorka

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If closed, you may revisit when your time allows and reopen! Thank you for your contributions.

stale[bot] avatar Jul 31 '18 03:07 stale[bot]